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