Create default scope to read journal
when using ledger python module
This commit is contained in:
parent
82486f6d43
commit
a9078767b8
1 changed files with 5 additions and 0 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
#include "pyinterp.h"
|
#include "pyinterp.h"
|
||||||
#include "pyutils.h"
|
#include "pyutils.h"
|
||||||
#include "account.h"
|
#include "account.h"
|
||||||
|
#include "report.h"
|
||||||
#include "xact.h"
|
#include "xact.h"
|
||||||
#include "post.h"
|
#include "post.h"
|
||||||
|
|
||||||
|
|
@ -76,6 +77,10 @@ void initialize_for_python()
|
||||||
export_xact();
|
export_xact();
|
||||||
export_session();
|
export_session();
|
||||||
export_journal();
|
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
|
struct python_run
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue