summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-02 01:36:58 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-02 01:36:58 -0600
commitddba59b703fcfeb546627ee7e44a25fab49c0c12 (patch)
treecd7e6467fc1a9c926995a043f5aee7eafecc45d0 /src/textual.cc
parent116cbd050b5f731b711529a053f73bb1ec275620 (diff)
downloadfork-ledger-ddba59b703fcfeb546627ee7e44a25fab49c0c12.tar.gz
fork-ledger-ddba59b703fcfeb546627ee7e44a25fab49c0c12.tar.bz2
fork-ledger-ddba59b703fcfeb546627ee7e44a25fab49c0c12.zip
This now works: ledger --import os eval 'os.path.isdir("/tmp")'
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textual.cc b/src/textual.cc
index a4e03435..95635184 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -1156,8 +1156,8 @@ void instance_t::python_directive(char * line)
if (! python_session->is_initialized)
python_session->initialize();
- python_session->main_nspace["journal"] =
- python::object(python::ptr(context.journal));
+ python_session->main_module->define_global
+ ("journal", python::object(python::ptr(context.journal)));
python_session->eval(script.str(), python_interpreter_t::PY_EVAL_MULTI);
}
#endif // HAVE_BOOST_PYTHON