OMPython is a Python interface that uses CORBA (omniORB) or ZeroMQ to communicate with OpenModelica.
- Python 2.7 is required (omniORB restriction). Download Python from http://www.python.org/download/
- omniORB is required
- Windows: included in the installer of OpenModelica
- Linux: Install omniORB including Python 2 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
- Installation using
pip
is recommended.
- Python 2.7 or 3.x.x is required. Download Python from http://www.python.org/download/
- PyZMQ is required.
- Installation using
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)
- See OMPython bugs on the OpenModelica trac or submit a new ticket.
- Pull requests are welcome.
Adeel Asghar, [email protected]
Arunkumar Palanisamy, [email protected]