pyrun
pyrun |
Purpose
Synopsis
procedure pyrun(filename:string)
Argument
filename
|
Regular file name of a Python script
|
Example
The following model runs a Python script:
model "Python script example" uses "python3" pyrun("my-python-script.py") end-model
Further information
1. The function compiles and runs a Python script and waits for its termination. It is a fatal error if the compilation fails or if a Python run-time error occurs.
2. Use the I/O
Driver python and the functions
pyget and
pyset to transfer data between Mosel and Python.
3. Do not run untrusted scripts,
e.g., scripts provided by the end user. See Section
Xpress Insight configuration for more information.
Related topics
Module
python3