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

Method begin

Qt/Python/pqPythonShell.cxx:113–132  ·  view source on GitHub ↗

* Must be called before executing a Python snippet in the shell. * Does several things: * 1. ensures that Python interpreter is initialized. * 2. ensures that the input/output streams are captured. */

Source from the content-addressed store, hash-verified

111 * 2. ensures that the input/output streams are captured.
112 */
113 void begin()
114 {
115 assert(this->ExecutionCounter >= 0);
116 if (this->ExecutionCounter == 0)
117 {
118 assert(this->OldInstance == nullptr);
119 Q_EMIT this->Parent->executing(true);
120
121 if (this->isInterpreterInitialized() == false)
122 {
123 this->initializeInterpreter();
124 }
125
126 this->OldInstance = vtkOutputWindow::GetInstance();
127 vtkOutputWindow::SetInstance(this->MessageCapture);
128 this->OldCapture = vtkPythonInterpreter::GetCaptureStdin();
129 vtkPythonInterpreter::SetCaptureStdin(true);
130 }
131 this->ExecutionCounter++;
132 }
133
134 /**
135 * Must match a `begin` and should be called when done with Python snippet

Callers 15

pqSettingsDialogMethod · 0.45
~pqInternalsMethod · 0.45
updatePropertyImplMethod · 0.45
statusMethod · 0.45
updateItemDataMethod · 0.45
writeKeyFrameDataMethod · 0.45
updateDecorationsMethod · 0.45
reloadMethod · 0.45
pqInternalMethod · 0.45
~pqInternalsMethod · 0.45
updatePropertyImplMethod · 0.45

Calls 2

initializeInterpreterMethod · 0.95

Tested by 3

ClearServerMethod · 0.36
InitializeMethod · 0.36
UpdateHostsMethod · 0.36