From a45ebac3d032d914f4fdd05eaf5ab56802606e09 Mon Sep 17 00:00:00 2001 From: syntron Date: Fri, 9 Jan 2026 09:55:23 +0100 Subject: [PATCH 1/2] update docstring of __init__.py - do not promote depreciated OMCSessionZMQ --- OMPython/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OMPython/__init__.py b/OMPython/__init__.py index 59a0ad10..624ee64f 100644 --- a/OMPython/__init__.py +++ b/OMPython/__init__.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- """ OMPython is a Python interface to OpenModelica. -To get started, create an OMCSessionZMQ object: -from OMPython import OMCSessionZMQ -omc = OMCSessionZMQ() +To get started on a local OMC server, create an OMCSessionLocal object: + +``` +import OMPython +omc = OMPython.OMCSessionLocal() omc.sendExpression("command") +``` + """ from OMPython.ModelicaSystem import ( From d562870c77e5d4983e0212c0ac9121e52ee20d31 Mon Sep 17 00:00:00 2001 From: syntron Date: Sat, 8 Nov 2025 11:36:27 +0100 Subject: [PATCH 2/2] reorder imports in __init__.py --- OMPython/__init__.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/OMPython/__init__.py b/OMPython/__init__.py index 624ee64f..6c07920b 100644 --- a/OMPython/__init__.py +++ b/OMPython/__init__.py @@ -22,19 +22,20 @@ OMCPath, OMCSession, OMCSessionCmd, - OMCSessionException, - OMCSessionRunData, - OMCSessionZMQ, - OMCSessionPort, - OMCSessionLocal, OMCSessionDocker, OMCSessionDockerContainer, + OMCSessionException, + OMCSessionLocal, + OMCSessionPort, + OMCSessionRunData, OMCSessionWSL, + OMCSessionZMQ, ) # global names imported if import 'from OMPython import *' is used __all__ = [ 'LinearizationResult', + 'ModelicaSystem', 'ModelicaSystemCmd', 'ModelicaSystemDoE', @@ -44,12 +45,12 @@ 'OMCSession', 'OMCSessionCmd', + 'OMCSessionDocker', + 'OMCSessionDockerContainer', 'OMCSessionException', - 'OMCSessionRunData', - 'OMCSessionZMQ', 'OMCSessionPort', 'OMCSessionLocal', - 'OMCSessionDocker', - 'OMCSessionDockerContainer', + 'OMCSessionRunData', 'OMCSessionWSL', + 'OMCSessionZMQ', ]