32 #ifndef _pqPythonShell_h 33 #define _pqPythonShell_h 35 #include "pqPythonModule.h" 41 class vtkPythonInteractiveInterpreter;
56 typedef QWidget Superclass;
59 pqPythonShell(QWidget* parent = 0, Qt::WindowFlags flags = 0);
67 void* consoleLocals();
80 void printMessage(
const QString&);
92 void executeScript(
const QString&);
110 void printString(
const QString&,
PrintMode mode = STATUS);
119 static void setPreamble(
const QStringList& statements);
127 void executing(
bool starting);
130 void pushScript(
const QString&);
139 static const char*
PS1() {
return ">>> "; }
140 static const char*
PS2() {
return "... "; }
146 void setupInterpreter();
153 bool prompt(
const QString& indent = QString());
155 void HandleInterpreterEvents(vtkObject* caller,
unsigned long eventid,
void* calldata);
164 #endif // !_pqPythonShell_h pqPythonShell is a QWidget subclass that provides an interactive Python shell.
void setExecuting(bool val)
bool isExecuting() const
Returns true is the shell is currently executing a script/command.
static const char * PS2()
static const char * PS1()
pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI comp...
vtkPythonInteractiveInterpreter * Interpreter
pqConsoleWidget * ConsoleWidget
static QStringList Preamble