diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2014-01-27 21:07:39 +0100 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2014-01-27 21:07:39 +0100 |
commit | a9078767b8224a223f8942a1cb80d4544024387b (patch) | |
tree | f890099a034d610b0f8bce96921c4fd54fbafc8a /src/pyinterp.cc | |
parent | 82486f6d43d1a3f85ddbf2e65bcc919b56a63e20 (diff) | |
download | fork-ledger-a9078767b8224a223f8942a1cb80d4544024387b.tar.gz fork-ledger-a9078767b8224a223f8942a1cb80d4544024387b.tar.bz2 fork-ledger-a9078767b8224a223f8942a1cb80d4544024387b.zip |
Create default scope to read journal
when using ledger python module
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r-- | src/pyinterp.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc index e15ff503..12690854 100644 --- a/src/pyinterp.cc +++ b/src/pyinterp.cc @@ -34,6 +34,7 @@ #include "pyinterp.h" #include "pyutils.h" #include "account.h" +#include "report.h" #include "xact.h" #include "post.h" @@ -76,6 +77,10 @@ void initialize_for_python() export_xact(); export_session(); export_journal(); + + python_session.reset(new ledger::python_interpreter_t); + shared_ptr<session_t> session_ptr = python_session; + scope_t::default_scope = new report_t(*session_ptr); } struct python_run |