Buildings.Obsolete.Utilities.IO.Python27.Functions
Package with functions that call Python
Information
This package contains functions that call Python.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
exchange | Function that communicates with Python |
Examples | Collection of models that illustrate model use and test models |
BaseClasses | Package with functions that call Python |
Buildings.Obsolete.Utilities.IO.Python27.Functions.exchange
Function that communicates with Python
Information
This function is a wrapper for
Buildings.Obsolete.Utilities.IO.Python27.Functions.BaseClasses.exchange.
It adds the directory modelica://Buildings/Resources/Python-Sources
to the environment variable PYTHONPATH
prior to calling the function that exchanges data with Python.
After the function call, the PYTHONPATH
is set back to what
it used to be when entering this function.
See
Buildings.Obsolete.Utilities.IO.Python27.UsersGuide
for instructions, and
Buildings.Obsolete.Utilities.IO.Python27.Functions.Examples
for examples.
Inputs
Type | Name | Default | Description |
---|---|---|---|
String | moduleName | Name of the python module that contains the function | |
String | functionName | moduleName | Name of the python function |
PythonObject | pytObj | Memory that holds the Python object | |
Boolean | passPythonObject | Set to true if the Python function returns and receives an object, see User's Guide | |
Real | dblWri[max(1, nDblWri)] | Double values to write | |
Integer | intWri[max(1, nIntWri)] | Integer values to write | |
String | strWri[max(1, nStrWri)] | String values to write | |
Integer | nDblWri | Number of double values to write | |
Integer | nDblRea | Number of double values to read | |
Integer | nIntWri | Number of integer values to write | |
Integer | nIntRea | Number of integer values to read | |
Integer | nStrWri | Number of strings to write |
Outputs
Type | Name | Description |
---|---|---|
Real | dblRea[max(1, nDblRea)] | Double values returned by Python |
Integer | intRea[max(1, nIntRea)] | Integer values returned by Python |