summaryrefslogtreecommitdiff
path: root/py_session.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-27 10:09:00 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:32 -0400
commitd0e9822ed16cb36de4cb1171a89d4049c615f1a0 (patch)
treefa48eba60a56dee5bcf1ebd266d822c5a96e4323 /py_session.cc
parent0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (diff)
downloadfork-ledger-d0e9822ed16cb36de4cb1171a89d4049c615f1a0.tar.gz
fork-ledger-d0e9822ed16cb36de4cb1171a89d4049c615f1a0.tar.bz2
fork-ledger-d0e9822ed16cb36de4cb1171a89d4049c615f1a0.zip
Moved around the Python code.
Diffstat (limited to 'py_session.cc')
-rw-r--r--py_session.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/py_session.cc b/py_session.cc
new file mode 100644
index 00000000..f249c54e
--- /dev/null
+++ b/py_session.cc
@@ -0,0 +1,36 @@
+using namespace boost::python;
+using namespace ledger;
+
+void export_session()
+{
+ class_< session_t > ("Session")
+ .def_readwrite("init_file", &session_t::init_file)
+ .def_readwrite("data_file", &session_t::data_file)
+ .def_readwrite("cache_file", &session_t::cache_file)
+ .def_readwrite("price_db", &session_t::price_db)
+
+ .def_readwrite("balance_format", &session_t::balance_format)
+ .def_readwrite("register_format", &session_t::register_format)
+ .def_readwrite("wide_register_format", &session_t::wide_register_format)
+ .def_readwrite("plot_amount_format", &session_t::plot_amount_format)
+ .def_readwrite("plot_total_format", &session_t::plot_total_format)
+ .def_readwrite("print_format", &session_t::print_format)
+ .def_readwrite("write_hdr_format", &session_t::write_hdr_format)
+ .def_readwrite("write_xact_format", &session_t::write_xact_format)
+ .def_readwrite("equity_format", &session_t::equity_format)
+ .def_readwrite("prices_format", &session_t::prices_format)
+ .def_readwrite("pricesdb_format", &session_t::pricesdb_format)
+
+ .def_readwrite("pricing_leeway", &session_t::pricing_leeway)
+
+ .def_readwrite("download_quotes", &session_t::download_quotes)
+ .def_readwrite("use_cache", &session_t::use_cache)
+ .def_readwrite("cache_dirty", &session_t::cache_dirty)
+ .def_readwrite("debug_mode", &session_t::debug_mode)
+ .def_readwrite("verbose_mode", &session_t::verbose_mode)
+ .def_readwrite("trace_alloc_mode", &session_t::trace_alloc_mode)
+ .def_readwrite("trace_class_mode", &session_t::trace_class_mode)
+
+ .def_readwrite("journals", &session_t::journals)
+ ;
+}