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
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, Protocol, Repeat Actions (while), Schedule Actions, Task System State, Trial, Unconditionally Execute Actions (else), Variable |