Specifications
Python
A-5
••••••••
3 RUNNING PYTHON SCRIPTS
The Python extension adds API calls to EDE which you can issue as
regular API function calls. To give an API command, enter the command
via the Tools | API Command dialog.
To execute a Python script, use the PythonExec API call or right-click on
the Python Output Window, select Run... and specify a Python script.
To execute a single Python statement, use the PythonExecStr API call.
To stop a running Python script, right-click on the Python Output
Window and select Control-break.
The following API calls are present:
PythonExec script_fle any_parameters
Executes a Python script. script_file is the name of the Python script
(usually with the .py extension), any_parameters consists of any
parameters r
equired by the Python script.
Example:
PythonExec C:\test.py
PythonExecStr
statement
Executes a Python statement. statement is any Python statement.
Example:
PythonExecStr print 3+4
PythonCtrlBreak
Stops the running Python script. The interpreter is limited to detecting the
halt request when doing I/O, that is reading from or printing to the EDE
Python window. This API call intended for use under a toolbar button.