diff options
Diffstat (limited to 'doc/Ledger.scriv/222.rtfd/TXT.rtf')
-rw-r--r-- | doc/Ledger.scriv/222.rtfd/TXT.rtf | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/Ledger.scriv/222.rtfd/TXT.rtf b/doc/Ledger.scriv/222.rtfd/TXT.rtf new file mode 100644 index 00000000..0e814392 --- /dev/null +++ b/doc/Ledger.scriv/222.rtfd/TXT.rtf @@ -0,0 +1,20 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038 +{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl264\slmult1\ql\qnatural\pardirnatural + +\f0\fs28 \cf0 from ledger import *\ +\ +session.read_journal("doc/sample.dat")\ +\ +new_session = Session()\ +\ +set_session_context(new_session)\ +session.read_journal("doc/sample.dat")\ +set_session_content(session) # restore the default session\ +\ +for txn in session.journal.transactions:\ + print txn.payee\ +\ + for p in txn.postings:\ + print p.account, "->", p.amount}
\ No newline at end of file |