blob: 528524767baeeafc675c7296671a21e433794442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import sys
import os
from ledger import *
def foo (str):
print "Hello:", str
def bar (str):
print "Goodbye:", str
register_option ("hello", "h:", foo)
register_option ("goodbye", "g:", bar)
print process_arguments (sys.argv[1:])
process_environment (os.environ, "TEST_")
sys.exit(0)
parser = TextualParser ()
register_parser (parser)
journal = Journal ()
parse_journal_file (sys.argv[1], journal)
print journal[-1].payee
|