MCPcopy Create free account
hub / github.com/MITK/MITK / Execute

Method Execute

Modules/Python/src/mitkPythonContext.cpp:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void mitk::PythonContext::Execute(const std::string &expression)
178{
179 py::gil_scoped_acquire gil;
180
181 try
182 {
183 py::exec(expression, m_Impl->Dictionary);
184 }
185 catch (py::error_already_set& e)
186 {
187 mitkThrow() << "An error occurred while executing Python code: " << e.what();
188 }
189}
190
191void mitk::PythonContext::ExecuteFile(const fs::path& filePath)
192{

Callers 15

ActivateMethod · 0.95
DispatchTaskMethod · 0.45
DispatchMethod · 0.45
DispatchFunction · 0.45
eventMethod · 0.45
TestBindImageToPythonMethod · 0.45
mitkPythonBindingsTestFunction · 0.45
CheckInstalledVersionMethod · 0.45
ExecuteSessionMethod · 0.45
IsInstalledMethod · 0.45

Calls 1

whatMethod · 0.80

Tested by 4

TestBindImageToPythonMethod · 0.36
mitkPythonBindingsTestFunction · 0.36