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
26
27namespace bp = boost::python;
28
30 // map the IO namespace to a sub-module
31 bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("rogue.hardware"))));
32
33 // make "from mypackage import class1" work
34 bp::scope().attr("hardware") = module;
35
36 // set the current scope to the new sub-module
37 bp::scope io_scope = module;
38
41}
static void setup_python()
Registers Python bindings for this class.
Definition MemMap.cpp:159
void setup_module()
Definition module.cpp:29