Workspace 6.21.5
RunPythonScript

Runs a user-defined Python script. Pass data in/out of the operation by configuring the inputs and outputs in the properties dialog. Most Workspace types can be interacted with by the script.

  • Default label: "Run python script"
  • Member of plug-in: Python36
  • Catalogue path: Scripting
Inputs:
Script fileQStringSet to the location of a user-defined Python script in a file.
ScriptQStringEnter user-defined Python script directly as an input.
Persistent namespaceboolUse a persistent local namespace between executes, meaning variables from the previous execute are still available on the next execute
Run in GUI threadboolExecute Python in the main GUI thread (needed to use some Python GUI packages)
Module pathsQStringList

Specify any additional module paths needed by the script. These will be added to sys.path. You can also specify Qt resource paths for modules files compiled into your library or application. The path of the current workflow is added automatically.