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 rpr = rogue::protocols::rssi;
30namespace 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.rssi"))));
35
36 // make "from mypackage import class1" work
37 bp::scope().attr("rssi") = module;
38
39 // set the current scope to the new sub-module
40 bp::scope io_scope = module;
41
42 rpr::Application::setup_python();
43 rpr::Client::setup_python();
44 rpr::Server::setup_python();
45 rpr::Transport::setup_python();
46}