OMPython is a Python interface that uses CORBA (omniORB) or ZeroMQ to communicate with OpenModelica.
- omniORB/PyZMQ is required.
- omniORB is installed including Python support (the omniidl command needs to be on the PATH)
On Ubuntu, this is done by runningsudo apt-get install omniorb python-omniorb omniidl omniidl-python - Python 2.7 is required (omniORB restriction). Download python from http://www.python.org/download/
- pip is recommended.
$ python -m pip install https://github.com/OpenModelica/OMPython/archive/master.zip- Add python to your PATH.
- Start command prompt/terminal and execute commands,
$ cd %OPENMODELICAHOME%\share\omc\scripts\PythonInterface
$ python -m pip install .- This will add OMPython to the python 3rd party libraries.
import OMPython
help(OMPython)Adeel, adeel.asghar@liu.se Anand, ganan642@student.liu.se