This class provides OpenFlippers Python interpreter.
More...
#include <OpenFlipper/PythonInterpreter/PythonInterpreter.hh>
|
void | log (Logtype _type, QString _message) |
| Log with OUT,WARN or ERR as type.
|
|
|
bool | runScript (QString _script) |
| Run a script. Output is passed to the standard logging facilities of OpenFlipper. More...
|
|
QString | runScriptOutput (QString _script) |
|
|
bool | externalLogging_ |
|
QString | LogErr |
|
QString | LogOut |
|
This class provides OpenFlippers Python interpreter.
Definition at line 49 of file PythonInterpreter.hh.
◆ PythonInterpreter()
PythonInterpreter::PythonInterpreter |
( |
| ) |
|
|
private |
◆ getInstance()
Creates or returns an instance of the interpreter.
There will only be one instance of the PythonInterpreter to ensure that we only run one context.
- Returns
Definition at line 78 of file PythonInterpreter.cc.
◆ initPython()
void PythonInterpreter::initPython |
( |
| ) |
|
|
private |
◆ modulesInitialized()
bool PythonInterpreter::modulesInitialized |
( |
| ) |
|
|
private |
◆ pyError()
void PythonInterpreter::pyError |
( |
const char * |
w | ) |
|
|
private |
Callback to redirect cerr log to OpenFlipper logger.
- Parameters
-
Definition at line 329 of file PythonInterpreter.cc.
◆ pyOutput()
void PythonInterpreter::pyOutput |
( |
const char * |
w | ) |
|
|
private |
Callback to redirect cout log to OpenFlipper logger.
- Parameters
-
Definition at line 320 of file PythonInterpreter.cc.
◆ resetInterpreter()
void PythonInterpreter::resetInterpreter |
( |
| ) |
|
|
private |
◆ runScript()
bool PythonInterpreter::runScript |
( |
QString |
_script | ) |
|
Run a script. Output is passed to the standard logging facilities of OpenFlipper.
- Parameters
-
- Returns
Definition at line 233 of file PythonInterpreter.cc.
◆ runScriptOutput()
QString PythonInterpreter::runScriptOutput |
( |
QString |
_script | ) |
|
\ brief run a script and return the output as a QString
- Parameters
-
- Returns
Definition at line 309 of file PythonInterpreter.cc.
The documentation for this class was generated from the following files: