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.

Source Distribution

OMPython-2.0.tar.gz (14.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page