Run Python String

Description

Execute the given string as Python source code.

For information on the modules and functions available to your Python code, see Run Python File.

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

Placement

Allowed at top level:

No

Allowed parent:

Block, Conditionally Execute Actions (if), List, On Exit, Protocol, Render Actions, Repeat Actions (while), Schedule Actions, Task System State, Trial, Unconditionally Execute Actions (else), Variable