Skip to main content

OpenModelica-Python API Interface

Project description

2012-03-19 [ganan642@student.liu.se]
--------------------------------------------

- Python 2.7 is required. Download python from http://www.python.org/download/.

- Add python to your PATH.

- Start command prompt/terminal and execute command "python setup.py install". This will add OMPython to the python 3rd party libraries.

- Now OMPython can be used as a library within any Python code that imports the "OMPython" module.

- Use OMPython.run() to test the OpenModelica-Python API Interface with OpenModelica commands.

- Use OMPython.execute("any-OpenModelica-command") to retreive results.

For dictionary results:

- After the result is available, use OMPython.get (result_dict,'dotted.notationed.dict.names') to easily traverse through the nested dictionaries and retrieve specific results.

- After the result is available, use OMPython.set (result_dict,'dotted.notationed.dict.names.new_dict', new_dict_value) to easily create a new dictionary(Key with a value assigned to it inside the nested dictionaries.

---------------------------------------------
Adeel, adeel.asghar@liu.se.
Anand, ganan642@student.liu.se

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for OMPython, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size OMPython-1.0.tar.gz (14.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page