root/yaml/neo20.py
@
1321
| Revision 1321, 393 bytes (checked in by martin_r, 4 years ago) |
|---|
| Line | |
|---|---|
| 1 | import yaml, sys |
| 2 | |
| 3 | try: |
| 4 | quelle = open("neo20.yaml") |
| 5 | try: |
| 6 | wurzel = yaml.load(quelle) #_all entfernen |
| 7 | finally: |
| 8 | quelle.close() |
| 9 | |
| 10 | except IOError: |
| 11 | pass |
| 12 | except yaml.YAMLError, exc: |
| 13 | if hasattr(exc, 'problem_mark'): |
| 14 | mark = exc.problem_mark |
| 15 | print "YAML-Parserfehler: (%s:%s)" % (mark.line+1, mark.column+1) |
| 16 | sys.stdin.read() |
Note: See TracBrowser
for help on using the browser.
