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;
29namespace rps = rogue::protocols::srp;
30
32 // map the IO namespace to a sub-module
33 bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("rogue.protocols.srp"))));
34
35 // make "from mypackage import class1" work
36 bp::scope().attr("srp") = module;
37
38 // set the current scope to the new sub-module
39 bp::scope io_scope = module;
40
41 rps::SrpV0::setup_python();
42 rps::SrpV3::setup_python();
43 rps::Cmd::setup_python();
44}