Generic embedded Python interpreter.
#include <PyInterp_Interp.h>
Constructor & Destructor Documentation
| PyInterp_Interp::PyInterp_Interp |
( |
| ) |
|
After construction the interpreter instance successor classes must call virtual method initalize().
| PyInterp_Interp::~PyInterp_Interp |
( |
| ) |
[virtual] |
Member Function Documentation
| void PyInterp_Interp::initialize |
( |
| ) |
|
This method shoud be called after construction of the interpreter. The method initialize() calls virtuals methods
- initPython() to initialize global Python interpreter
- initState() to initialize embedded interpreter state
- initContext() to initialize interpreter internal context
- initRun() to prepare interpreter for running commands which should be implemented in the successor classes, according to the embedded Python interpreter policy (mono or multi interpreter, etc).
References _history, _ith, _tstate, _verr, _vout, initContext(), initPython(), initRun(), initState(), and newPyStdOut().
| int PyInterp_Interp::run |
( |
const char * |
command | ) |
[virtual] |
| std::string PyInterp_Interp::getbanner |
( |
| ) |
|
| void PyInterp_Interp::setverrcb |
( |
PyOutChanged * |
cb, |
|
|
void * |
data |
|
) |
| |
- Parameters:
-
| cb | callback function |
| data | callback function parameters |
References _verr.
| void PyInterp_Interp::setvoutcb |
( |
PyOutChanged * |
cb, |
|
|
void * |
data |
|
) |
| |
- Parameters:
-
| cb | callback function |
| data | callback function parameters |
References _vout.
| const char * PyInterp_Interp::getPrevious |
( |
| ) |
|
| const char * PyInterp_Interp::getNext |
( |
| ) |
|
| virtual int PyInterp_Interp.beforeRun |
( |
| ) |
[protected, virtual] |
| int PyInterp_Interp::simpleRun |
( |
const char * |
command, |
|
|
const bool |
addToHistory = true |
|
) |
| [protected] |
| bool PyInterp_Interp::initRun |
( |
| ) |
[protected, virtual] |
This method is used to prepare interpreter for running Python commands.
- Returns:
true on success and false on error
| void PyInterp_Interp::initPython |
( |
| ) |
[protected, virtual] |
In case if Python is not initialized, it sets program name, initializes the interpreter, sets program arguments, initializes threads. Otherwise, it just obtains the global interpreter and thread states. This is important for light SALOME configuration, as in full SALOME this is done at SalomeApp level.
- See also:
- SalomeApp_PyInterp class
Reimplemented in LightApp_PyInterp, SALOME_PYQT_PyInterp, and SalomeApp_PyInterp.
References _argc, _argv, _gtstate, and _interp.
| virtual bool PyInterp_Interp.initState |
( |
| ) |
[protected, pure virtual] |
| virtual bool PyInterp_Interp.initContext |
( |
| ) |
[protected, pure virtual] |
Field Documentation