From ea1f2121389569d5e0addf8066bca9bf24174c16 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 16 Sep 2025 23:59:25 -0400 Subject: Start python library --- examples/conf.pom | 17 +++++++++++++++++ examples/read_conf.py | 10 ++++++++++ 2 files changed, 27 insertions(+) create mode 100644 examples/conf.pom create mode 100644 examples/read_conf.py (limited to 'examples') diff --git a/examples/conf.pom b/examples/conf.pom new file mode 100644 index 0000000..82e1abd --- /dev/null +++ b/examples/conf.pom @@ -0,0 +1,17 @@ +indentation-type = tabs +show-line-numbers = yes +tab-size = 4 +font-size = "18" + +[file-extensions] +C = .c, .h +Cpp = .cpp, .hpp, .cc, .hh + +[plug-in.edit-over-ssh] +path = ~/misc/edit-over-ssh.so +enabled = yes + +[plug-in.wrap-text] +path = ~/misc/wrap_text_v3.5.7.so +enabled = no + 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)) -- cgit v1.2.3