30 #ifndef _MIRA_TOOLBOXES_PYTHON_PYTHONINTERPRETER_H_ 31 #define _MIRA_TOOLBOXES_PYTHON_PYTHONINTERPRETER_H_ 33 #include <boost/optional.hpp> 46 namespace mira {
namespace python {
65 bool mInterpreterInitialized =
false;
66 boost::optional<Path> mVirtualEnvironmentPath;
90 boost::python::object
importModule(
const std::string & name);
boost::python::object mGlobalDict
Definition: PythonInterpreter.h:103
Definition: PythonInterpreter.h:50
boost::filesystem::path Path
void extendPath(const std::string &path)
Extend the list of search paths for python modules by the given path.
boost::optional< Path > getVirtualEnvironmentPath() const
Return the configured virtual Python environment.
Definition: PythonInterpreter.h:59
Definition: PythonInterpreter.h:71
boost::python::dict getLocalDict()
Get a local copy of the global dict (dict) of the main module.
Definition: PythonInterpreter.h:86
boost::python::object getMainModule()
Get the main (main) module.
Definition: PythonInterpreter.h:78
PyThreadState * mMainThreadState
PyEval_ReleaseLock() is deprecated and should not be used anymore.
Definition: PythonInterpreter.h:110
Exception handling for python exceptions.
boost::python::dict getGlobalDict()
Get the global dict (dict) of the main module.
Definition: PythonInterpreter.h:82
void setVirtualEnvironmentPath(const Path &path)
Set the virtual Python environment, which should be used by the Python interpreter.
Include this instead of boost/python.hpp to reduce compile time warning spam from Boost internal inco...
boost::python::object mMainModule
Definition: PythonInterpreter.h:102
boost::python::object importModule(const std::string &name)
Import a python module.
void setInterpreterInitialized()
Definition: PythonInterpreter.h:62