rogue
Loading...
Searching...
No Matches
module.cpp
Go to the documentation of this file.
1
18#include "rogue/Directives.h"
19
21
22#include <boost/python.hpp>
23
30
31namespace bp = boost::python;
32namespace ru = rogue::utilities;
34
36 // map the IO namespace to a sub-module
37 bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("rogue.utilities"))));
38
39 // make "from mypackage import class1" work
40 bp::scope().attr("utilities") = module;
41
42 // set the current scope to the new sub-module
43 bp::scope io_scope = module;
44
45 ru::Prbs::setup_python();
46 ru::StreamZip::setup_python();
47 ru::StreamUnZip::setup_python();
48 ru::fileio::setup_module();
49}
void setup_module()
Definition module.cpp:35