Run Python File

Available on macOS

Description

Execute the specified file as Python source code.

Within the Python code, use getvar to retrieve the value of an MWorks variable and setvar to set it, e.g.

x = getvar('x')
setvar('x', x + 1)

Signature

action/run_python_file

Required Parameters

path

Filesystem path to the Python source file

Optional Parameters

stop_on_failure

Default:NO

If YES, the experiment will stop automatically if Python execution fails