So investigating the source a bit I have a few clues on what would need to happen ... I think.
The query returns a collection of Postings. Each posting has a xdata member that contains amongst other items a "total" value. But per post.h xdata is only produced for reports and not until the last possible moment. How through python can that get triggered. I would think the Query result would satisfy the conditions. I did find that although the default csv format doesn't include amount it can be added. But it doesn't make since to parse the output of a terminal command in python if the data could already be obtained native to python. // This variable holds optional "extended data" which is usually produced > > // only during reporting, and only for the posting set being reported. > > // It's a memory-saving measure to delay allocation until the last >> possible > > // moment. > > mutable optional<xdata_t> xdata_; > > On Tuesday, January 17, 2017 at 8:19:44 PM UTC-5, p51d78th wrote: > > Using the python query command is it possible to get the running total or > balance of a result set? I know I can just iterate the result set when the > output is created but that won't work with a display predicate. > > For instance what I would like specifically is the data and the running > that would be associated with the following command. > > journal.query('^Assets:Checking$ -d d>=[last week]') > > If that doesn't work I also noticed that the csv command doesn't provide > it either. Is there any other command than register that would provide this? > > Thanks > David > -- --- 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 options, visit https://groups.google.com/d/optout.