MCPcopy Create free account
hub / github.com/Kitware/ParaView / pushScript

Method pushScript

Qt/Python/pqPythonShell.cxx:365–382  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

363
364//-----------------------------------------------------------------------------
365void 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//-----------------------------------------------------------------------------
385void* pqPythonShell::consoleLocals()

Callers

nothing calls this directly

Calls 5

promptMethod · 0.95
CLEAR_UNDO_STACKFunction · 0.85
splitMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected