#include <PythonScript.h>

Public Slots | |
| bool | compile (bool for_eval=true) |
| Compile the Code. Return true if the implementation doesn't support compilation. | |
| QVariant | eval () |
| Evaluate the Code, returning QVariant() on an error / exception. | |
| bool | exec () |
| Execute the Code, returning false on an error / exception. | |
| void | setContext (QObject *context) |
| Set the context in which the code is to be executed. | |
| bool | setDouble (double val, const char *name) |
| bool | setInt (int val, const char *name) |
| bool | setQObject (QObject *val, const char *name) |
Public Member Functions | |
| PythonScript (PythonScripting *env, const QString &code, QObject *context=0, const QString &name="<input>") | |
| void | write (const QString &text) |
| ~PythonScript () | |
Private Member Functions | |
| void | beginStdoutRedirect () |
| void | endStdoutRedirect () |
| PythonScripting * | env () |
Private Attributes | |
| bool | isFunction |
| PyObject * | localDict |
| PyObject * | PyCode |
| PyObject * | stderrSave |
| PyObject * | stdoutSave |
| PythonScript::PythonScript | ( | PythonScripting * | env, | |
| const QString & | code, | |||
| QObject * | context = 0, |
|||
| const QString & | name = "<input>" | |||
| ) |
| PythonScript::~PythonScript | ( | ) |
| void PythonScript::beginStdoutRedirect | ( | ) | [private] |
| bool PythonScript::compile | ( | bool | for_eval = true |
) | [virtual, slot] |
Compile the Code. Return true if the implementation doesn't support compilation.
Reimplemented from Script.
| void PythonScript::endStdoutRedirect | ( | ) | [private] |
| PythonScripting* PythonScript::env | ( | ) | [inline, private] |
| QVariant PythonScript::eval | ( | ) | [virtual, slot] |
| bool PythonScript::exec | ( | ) | [virtual, slot] |
| void PythonScript::setContext | ( | QObject * | context | ) | [virtual, slot] |
| bool PythonScript::setDouble | ( | double | val, | |
| const char * | name | |||
| ) | [virtual, slot] |
Reimplemented from Script.
| bool PythonScript::setInt | ( | int | val, | |
| const char * | name | |||
| ) | [virtual, slot] |
Reimplemented from Script.
| bool PythonScript::setQObject | ( | QObject * | val, | |
| const char * | name | |||
| ) | [slot] |
| void PythonScript::write | ( | const QString & | text | ) | [inline] |
bool PythonScript::isFunction [private] |
PyObject * PythonScript::localDict [private] |
PyObject* PythonScript::PyCode [private] |
PyObject * PythonScript::stderrSave [private] |
PyObject * PythonScript::stdoutSave [private] |
1.5.3