@@ -27,6 +27,38 @@ class which means it will use OMCSessionZMQ by default. If you want to use
2727That format is harder to use.
2828"""
2929
30+ from __future__ import absolute_import
31+ from __future__ import division
32+ from __future__ import print_function
33+ from builtins import int , range
34+ from copy import deepcopy
35+ from distutils import spawn
36+
37+ import abc
38+ import csv
39+ import getpass
40+ import logging
41+ import os
42+ import platform
43+ import subprocess
44+ import sys
45+ import tempfile
46+ import time
47+ import uuid
48+ import xml .etree .ElementTree as ET
49+
50+ import numpy as np
51+ import pyparsing
52+
53+
54+ if sys .platform == 'darwin' :
55+ # On Mac let's assume omc is installed here and there might be a broken omniORB installed in a bad place
56+ sys .path .append ('/opt/local/lib/python2.7/site-packages/' )
57+ sys .path .append ('/opt/openmodelica/lib/python2.7/site-packages/' )
58+
59+ # TODO: replace this with the new parser
60+ from OMPython import OMTypedParser , OMParser
61+
3062__license__ = """
3163 This file is part of OpenModelica.
3264
@@ -58,35 +90,6 @@ class which means it will use OMCSessionZMQ by default. If you want to use
5890 Version: 1.1
5991"""
6092
61- from builtins import int , range
62- from copy import deepcopy
63- from distutils import spawn
64-
65- import abc
66- import csv
67- import getpass
68- import logging
69- import os
70- import platform
71- import subprocess
72- import sys
73- import tempfile
74- import time
75- import uuid
76- import xml .etree .ElementTree as ET
77-
78- import numpy as np
79- import pyparsing
80-
81-
82- if sys .platform == 'darwin' :
83- # On Mac let's assume omc is installed here and there might be a broken omniORB installed in a bad place
84- sys .path .append ('/opt/local/lib/python2.7/site-packages/' )
85- sys .path .append ('/opt/openmodelica/lib/python2.7/site-packages/' )
86-
87- # TODO: replace this with the new parser
88- from OMPython import OMTypedParser , OMParser
89-
9093# Logger Defined
9194logger = logging .getLogger ('OMPython' )
9295logger .setLevel (logging .DEBUG )
0 commit comments