diff options
Diffstat (limited to 'examples/read_conf.py')
-rw-r--r-- | examples/read_conf.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/read_conf.py b/examples/read_conf.py new file mode 100644 index 0000000..e49fd4f --- /dev/null +++ b/examples/read_conf.py @@ -0,0 +1,10 @@ +# Put root of repository in sys.path +# (Ordinarily you won't want to do this — this is only +# needed to make this example work without pom_parser installed.) +from pathlib import Path +import sys +sys.path.append(str(Path(__file__).parent.parent)) + +import pom_parser +filename = 'examples/conf.pom' if len(sys.argv) < 2 else sys.argv[1] +print(pom_parser.load_path(filename)) |