Run Python String

Description

Execute the given string 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_string

Required Parameters

code

Python code to execute

Optional Parameters

stop_on_failure

Default:NO

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