I'm trying to understand section 13.1 in the Ledger manual, on basic data 
traversal with python. Following the example,

 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
)

I'm able to assign post.amount and post.account to variables/lists in my 
python code. I discovered I can also use post.date for the date.

I'm relatively new at python. Where can I find a list of what other options 
are available in the 'post' object? Is this something I can find somewhere 
in Ledger's source code?

I would like to be able to assign my commodities cost basis to variables, 
so I can implement FIFO lot reductions in python and output another ledger 
file with the cost basis notations inserted for my lot reductions.

Thanks!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to