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