Re: Second call to ledger.read_journal() fails

2017-08-15 Thread Bob Hossley
On Monday, August 14, 2017 at 7:59:54 PM UTC-7, John Wiegley wrote: > > > There should be a 'ledger.session', package global variable you can use. > > Thanks. Unfortunately, ledger.session.close_journal_files() Segmentation faults when I use it as I would like to use it. If I do a ledger.read_j

Re: Second call to ledger.read_journal() fails

2017-08-14 Thread Bob Hossley
now how to get a ledger.Session object. Bob Hossley -- --- 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 ledger-cli+unsubscr...@googlegroups.com. For more

Second call to ledger.read_journal() fails

2017-08-14 Thread Bob Hossley
I'm trying to use the Ledger Python Extension. I have written a Python function to read a journal and return a dictionary mapping stock symbol to account name. I'm writing another Python function to calculate the Internal Rate of Return for one specified stock. Hence, I have one Python script

How do I obtain the "lot price"?

2017-08-03 Thread Bob Hossley
Thanks for any help you can give me. *Question about Report Format String*The "lot price" (the price of one share) is shown in curly braces by the format string parameter %(amount). But I have been unable to obtain just the "lot price" using a format string parameter. I suspect that %(price

Sorting on multiple keys and Sort Stability

2017-07-05 Thread Bob Hossley
The ledger sort is *NOT* "stable". A sort is "stable" iff when multiple records have the same key, their original order is preserved. Consequently, I can't use the ledger sort to achieve sorting on multiple keys. When I convert my GnuCash file to Ledger, the transactions are in random order. I