diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-14 06:25:29 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-14 06:25:29 -0400 |
commit | 061e19e302fb62eaafbd2029671bdd46dd4d7814 (patch) | |
tree | 081700c4302e6efc0f7954dbeaf8d86d4e63e907 /main.py | |
parent | 0b0c9b5bd13b1dedf100b137e3a35be60d3d3a27 (diff) | |
download | fork-ledger-061e19e302fb62eaafbd2029671bdd46dd4d7814.tar.gz fork-ledger-061e19e302fb62eaafbd2029671bdd46dd4d7814.tar.bz2 fork-ledger-061e19e302fb62eaafbd2029671bdd46dd4d7814.zip |
make config_t visible to Python; almost possible to implement main.cc in main.py
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -9,16 +9,18 @@ def hello (str): def goodbye (str): print "Goodbye:", str -register_option ("hello", "h:", hello) -register_option ("goodbye", "g:", goodbye) +add_config_option_handlers () +add_option_handler ("hello", ":", hello) +add_option_handler ("goodbye", ":", goodbye) + args = process_arguments (sys.argv[1:]) -process_environment (os.environ, "TEST_") +process_environment (os.environ, "LEDGER_") -parser = TextualParser () -register_parser (parser) +text_parser = TextualParser () +register_parser (text_parser) journal = Journal () -parse_journal_file (args[0], journal) +print parse_journal_file (args[0], journal), "entries" class FormatTransaction (TransactionHandler): def __init__ (self, fmt): |