From a9078767b8224a223f8942a1cb80d4544024387b Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 27 Jan 2014 21:07:39 +0100 Subject: Create default scope to read journal when using ledger python module --- src/pyinterp.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/pyinterp.cc') 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_ptr = python_session; + scope_t::default_scope = new report_t(*session_ptr); } struct python_run -- cgit v1.2.3