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
27
28namespace bp = boost::python;
30
32 // map the IO namespace to a sub-module
33 bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("rogue.utilities.fileio"))));
34
35 // make "from mypackage import class1" work
36 bp::scope().attr("fileio") = module;
37
38 // set the current scope to the new sub-module
39 bp::scope io_scope = module;
40
41 ruf::StreamReader::setup_python();
42 ruf::StreamWriter::setup_python();
43 ruf::StreamWriterChannel::setup_python();
44}