Skip to main content

OMPython

OMPython is a Python interface that uses ZeroMQ or CORBA (omniORB) to communicate with OpenModelica.

FMITest Test

Dependencies

Using ZeroMQ

  • Python 2.7 and 3.x supported
  • PyZMQ is required

Using omniORB

  • Currently, only Python 2.7 is supported
  • omniORB is required:
    • Windows: included in the OpenModelica installation
    • Linux: Install omniORB including Python 2 support (the omniidl command needs to be on the PATH). On Ubuntu, this is done by running sudo apt-get install omniorb python-omniorb omniidl omniidl-python

Installation

Installation using pip is recommended.

Linux

Install the latest OMPython master by running:

python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip

Windows

Install the version packed with your OpenModelica installation by running:

cd %OPENMODELICAHOME%\share\omc\scripts\PythonInterface
python -m pip install -U .

Local installation

To Install the latest version of the OMPython master branch only, previously cloned into <OMPythonPath>, run:

cd <OMPythonPath>
python -m pip install -U .

Usage

Running the following commands should get you started

import OMPython
help(OMPython)
from OMPython import OMCSessionZMQ
omc = OMCSessionZMQ()
omc.sendExpression("getVersion()")

or read the OMPython documentation online.

Bug Reports

Contact

Metadata

Release files for OMPython 3.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OMPython 3.6.0
File Size Uploaded Provenance Actions
OMPython-3.6.0.tar.gz 27.7 kB Without provenance Details for OMPython-3.6.0.tar.gz

Release files / OMPython-3.6.0.tar.gz

Download URL OMPython-3.6.0.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3b423bd9bab64a8224e029994fe98f833773d761998c878d5e69aa6e66b171ef
BLAKE2b-256 checksum
How to use checksums
08fe9d54052f772ce6292687107d3bd5c4cb39f35f6b1b36e694cdf0bf54430b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.5

Security for OMPython 3.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page