-----------------------------------------------------------------------------
| 363 | |
| 364 | //----------------------------------------------------------------------------- |
| 365 | void pqPythonShell::pushScript(const QString& script) |
| 366 | { |
| 367 | QString command = script; |
| 368 | command.replace("\r\n", "\n"); |
| 369 | command.replace("\r", "\n"); |
| 370 | QStringList lines = script.split("\n"); |
| 371 | |
| 372 | this->Prompted = false; |
| 373 | this->Internals->begin(); |
| 374 | Q_FOREACH (QString line, lines) |
| 375 | { |
| 376 | bool isMultilineStatement = this->Internals->interpreter()->Push(line.toUtf8().data()); |
| 377 | this->Prompt = isMultilineStatement ? pqPythonShell::PS2() : pqPythonShell::PS1(); |
| 378 | } |
| 379 | this->Internals->end(); |
| 380 | this->prompt(); |
| 381 | CLEAR_UNDO_STACK(); |
| 382 | } |
| 383 | |
| 384 | //----------------------------------------------------------------------------- |
| 385 | void* pqPythonShell::consoleLocals() |
nothing calls this directly
no test coverage detected