#include <interpreter.hh>
| Public Member Functions | |
| PyObject * | globals () | 
| Return a pointer to the dictionary of global variables.  More... | |
| Interpreter () | |
| std::string | processStream (std::istream &stream, std::ostream &os) | 
| Process input stream to send relevant blocks to python.  More... | |
| std::string | python (const std::string &command) | 
| Method to start python interperter.  More... | |
| void | python (const std::string &command, std::string &result, std::string &out, std::string &err) | 
| Method to start python interperter.  More... | |
| void | runMain (void) | 
| void | runPythonFile (std::string filename) | 
| Method to exectue a python script.  More... | |
| void | runPythonFile (std::string filename, std::string &err) | 
| ~Interpreter () | |
| Private Attributes | |
| PyThreadState * | _pyState | 
| The Python thread state.  More... | |
| PyObject * | globals_ | 
| Pointer to the dictionary of global variables.  More... | |
| PyObject * | mainmod_ | 
This class implements a basis python interpreter.
String sent to method python are interpreted by an onboard python interpreter.
Definition at line 21 of file interpreter.hh.
| dynamicgraph::python::Interpreter::Interpreter | ( | ) | 
Definition at line 69 of file interpreter.cc.
| dynamicgraph::python::Interpreter::~Interpreter | ( | ) | 
Definition at line 98 of file interpreter.cc.
| PyObject * dynamicgraph::python::Interpreter::globals | ( | ) | 
Return a pointer to the dictionary of global variables.
Definition at line 207 of file interpreter.cc.
| std::string dynamicgraph::python::Interpreter::processStream | ( | std::istream & | stream, | 
| std::ostream & | os | ||
| ) | 
Process input stream to send relevant blocks to python.
| stream | input stream | 
Definition at line 248 of file interpreter.cc.
| std::string dynamicgraph::python::Interpreter::python | ( | const std::string & | command | ) | 
Method to start python interperter.
| command | string to execute Method deprecated, you SHOULD handle error messages. | 
Definition at line 138 of file interpreter.cc.
| void dynamicgraph::python::Interpreter::python | ( | const std::string & | command, | 
| std::string & | result, | ||
| std::string & | out, | ||
| std::string & | err | ||
| ) | 
Method to start python interperter.
| command | string to execute, result, stdout, stderr strings | 
Definition at line 144 of file interpreter.cc.
| void dynamicgraph::python::Interpreter::runMain | ( | void | ) | 
Definition at line 236 of file interpreter.cc.
| void dynamicgraph::python::Interpreter::runPythonFile | ( | std::string | filename | ) | 
Method to exectue a python script.
| filename | the filename | 
Definition at line 209 of file interpreter.cc.
| void dynamicgraph::python::Interpreter::runPythonFile | ( | std::string | filename, | 
| std::string & | err | ||
| ) | 
Definition at line 214 of file interpreter.cc.
| 
 | private | 
The Python thread state.
Definition at line 51 of file interpreter.hh.
| 
 | private | 
Pointer to the dictionary of global variables.
Definition at line 53 of file interpreter.hh.
| 
 | private | 
Definition at line 54 of file interpreter.hh.