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