#include <pythonscript.h>
Inheritance diagram for PythonScript:
Public Member Functions | |
PythonScript (ostream &debug, unsigned short debug_level, ostream &error, string filename, string functionname, PycStringIO_CAPI *cStringIO) | |
Constructor. Create Object. | |
virtual | ~PythonScript () |
Destructor. | |
Protected Member Functions | |
virtual void | run () throw (ApplicationError) |
Reads the given python script and calls the given function. | |
virtual void | final () |
Called by pscript_cleanup_handler(), will delete the current object. | |
string | prefix (bool verbose=true) |
return a prefix containing this pointer, Python script name and date for log messages | |
Protected Attributes | |
string | filename |
name of the python script to read | |
string | functionname |
name of the function to call | |
PyObject * | args |
python tuple containing the args for the called python function | |
ostream & | debug |
debug stream | |
ostream & | error |
error stream | |
unsigned short | debug_level |
debug level | |
PycStringIO_CAPI * | cStringIO |
holds a pointer to the Python cStringIO C API |
This class reads a given python script which must define one function with given name. This function is called with arbitrary parameters.
|
Constructor. Create Object.
|
|
Destructor.
|
|
Called by pscript_cleanup_handler(), will delete the current object.
|
|
return a prefix containing this pointer, Python script name and date for log messages
|
|
Reads the given python script and calls the given function. The arguments for the function must be given in the constructor.
Reimplemented in IdleScript, and IncomingScript.
|
|
python tuple containing the args for the called python function
|
|
holds a pointer to the Python cStringIO C API
|
|
debug stream
|
|
debug level
|
|
error stream
|
|
name of the python script to read
|
|
name of the function to call
|