ym2_exec()

Read(7) Label: python, parameter,

Description:

Call a Python script.

Syntax:

ym2_exec(pyFile,param1,param2,...)

Note:

YmodelCli external library function (See YModel User Reference).

 

The function calls a Python script, passes a parameter to the script, and returns script execution result.

Parameter:

pyFile

Python file path.

param

A parameter.

Return value:

Python script execution result

Example:

 

A

 

1

=ym2_env("F:/ymodel")

 

2

=ym2_exec("F:/demo.py",120.0)

Pass a parameter to demo.py.

3

=date("1982/08/09")

 

4

=ym2_exec("F:/test.py",A3,now())

Pass two parameters to test.py.

5

>ym2_close()