Thanks! I managed to compile with the --python passed to acprep but I get
the following error while trying to execute the examples shown on this post:
./ledger/ledger python ledger-script.py
Traceback (most recent call last):
File "ledger-script.py", line 6, in <module>
for post in post.xact.posts:
TypeError: 'instancemethod' object is not iterable
Abort trap: 6
On Sunday, March 11, 2012 7:37:32 AM UTC-3, John Wiegley wrote:
>
> >>>>> Raphael Lorenzeto writes:
>
> > Long story short, I haven't found a way to access this Python interface,
> my
> > intent is to produce a series of scripts to output HMTL5 files with my
> > reports on a regular basis (probably a cron-job). How can I do this? Is
> > there any way to communicate with Ledger without having to put it in REPL
> > mode and creating the interface myself?
>
> Make sure to pass --python to acprep when you build (you'll have to make
> distclean if you're just adding that flag now). Then you use 'ledger
> python
> foo.py' to run a Python script with the ability to 'import ledger' in that
> script. See earlier postings in this mailing list for some examples of
> what
> you can do then...
>
> John
>
>