diff options
author | pommicket <pommicket@gmail.com> | 2025-09-16 23:59:25 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-16 23:59:25 -0400 |
commit | ea1f2121389569d5e0addf8066bca9bf24174c16 (patch) | |
tree | a538498f4132c14abb8e7cea9174a72259047bcb /examples/read_conf.py |
Start python library
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)) |