Just out of curiousity...
I never managed to get any small python script running, ledger built
with/or without python or whatsoever.
My current version is a build from today: Ledger 3.0.0-20110325; with
--python
dir(ledger) displays what it should.
No script provided in this thread does work though.
E.g. this one:
    import ledger

    for xact in ledger.read_journal("sample.dat").xacts:
        for post in xact.posts:
            print "Transferring %s to/from %s" % (post.amount,
post.account)

Leads to this error message:

Traceback (most recent call last):
  File "/home/me/script.py", line 3, in <module>
    for xact in ledger.read_journal("sample.dat").xacts:
AttributeError: 'module' object has no attribute 'read_journal'

Any hint appreciated.
henry

Reply via email to