Skip to content

Commit dfe090f

Browse files
committed
cleanup of __init__.py after moving all classes into separate files
1 parent ce731ca commit dfe090f

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

OMPython/__init__.py

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,17 @@
77
omc.sendExpression("command")
88
"""
99

10-
import shutil
11-
import abc
12-
import csv
13-
import getpass
1410
import logging
15-
import json
16-
import os
17-
import platform
18-
import psutil
19-
import re
20-
import signal
21-
import subprocess
2211
import sys
23-
import tempfile
24-
import time
25-
import uuid
26-
import xml.etree.ElementTree as ET
27-
import numpy as np
28-
import pyparsing
29-
import importlib
30-
import zmq
31-
import pathlib
32-
import warnings
3312

3413

3514
if sys.platform == 'darwin':
3615
# On Mac let's assume omc is installed here and there might be a broken omniORB installed in a bad place
3716
sys.path.append('/opt/local/lib/python2.7/site-packages/')
3817
sys.path.append('/opt/openmodelica/lib/python2.7/site-packages/')
3918

40-
# TODO: replace this with the new parser
41-
from OMPython import OMTypedParser, OMParser
19+
from OMPython.OMCSession import OMCSessionBase, OMCSessionZMQ
20+
from OMPython.ModelicaSystem import ModelicaSystem, ModelicaSystemError
4221

4322
__license__ = """
4423
This file is part of OpenModelica.
@@ -83,3 +62,13 @@
8362
# add the handlers to the logger
8463
logger.addHandler(logger_console_handler)
8564
logger.setLevel(logging.WARNING)
65+
66+
67+
# global names imported if import 'from OMPython import *' is used
68+
__all__ = [
69+
'ModelicaSystem',
70+
'ModelicaSystemError',
71+
72+
'OMCSessionZMQ',
73+
'OMCSessionBase',
74+
]

0 commit comments

Comments
 (0)