This class implements an interactive Python interpreter. More...
#include <PythonConsole.h>
Public Member Functions | |
| void | clearBuffer () |
| int | compileCommand (const char *) const |
| Compile a command and determine whether it is incomplete. | |
| QStringList | getBuffer () const |
| InteractiveInterpreter () | |
| bool | push (const char *) |
| Store the line into the internal buffer and compile the total buffer. | |
| void | setBuffer (const QStringList &) |
| ~InteractiveInterpreter () | |
This class implements an interactive Python interpreter.
Definition at line 40 of file PythonConsole.h.
| InteractiveInterpreter::InteractiveInterpreter | ( | ) |
Definition at line 100 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::interpreter.
| InteractiveInterpreter::~InteractiveInterpreter | ( | ) |
Definition at line 118 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::interpreter, and Gui::InteractiveInterpreterP::sysmodule.
| void InteractiveInterpreter::clearBuffer | ( | ) |
Definition at line 323 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::buffer.
| int InteractiveInterpreter::compileCommand | ( | const char * | source | ) | const |
Compile a command and determine whether it is incomplete.
The source string may contain line feeds and/or carriage returns.
Return value:
(OverflowError and ValueError can be produced by malformed literals).
Definition at line 183 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::interpreter.
| QStringList InteractiveInterpreter::getBuffer | ( | ) | const |
Definition at line 313 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::buffer.
| bool InteractiveInterpreter::push | ( | const char * | line | ) |
Store the line into the internal buffer and compile the total buffer.
In case it is a complete Python command the buffer is emptied.
Definition at line 289 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::buffer.
| void InteractiveInterpreter::setBuffer | ( | const QStringList & | buf | ) |
Definition at line 318 of file PythonConsole.cpp.
References Gui::InteractiveInterpreterP::buffer.
1.6.1