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