diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-12 05:26:06 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-12 05:26:06 -0500 |
commit | 49a356f2d260ed0cc071ca1aa82027bd325b0b8b (patch) | |
tree | dce7e13ec7ad8f18bc628efe511d17e94bc3e16d /doc/ledger.1 | |
parent | 65ba928a59a668e3a7eaf06da304360a13b9ca92 (diff) | |
download | fork-ledger-49a356f2d260ed0cc071ca1aa82027bd325b0b8b.tar.gz fork-ledger-49a356f2d260ed0cc071ca1aa82027bd325b0b8b.tar.bz2 fork-ledger-49a356f2d260ed0cc071ca1aa82027bd325b0b8b.zip |
Added a Journal.collect method to Python
This lets you run standard report queries against a Ledger journal and
get back a collection of postings, for example:
import ledger
journal = ledger.Journal("sample.dat")
posts = journal.collect("-M assets")
for post in posts:
print post.account
However, this code is not really working yet for a large variety of
reasons, having to do with object life-time, shallow copying, and lack
of reference counting where it should be. For instance, calling
ledger.Journal().collect() fails because the temporary journal object is
destroyed and the collection now has a host of bad pointers. Using "for
post in journal.collect()" fails too with other bad pointers. And the
whole lot of it crashes on exit at the moment.
Diffstat (limited to 'doc/ledger.1')
0 files changed, 0 insertions, 0 deletions