1+ # -*- coding: utf-8 -*-
2+ """
3+ Definition of an OMC session.
4+ """
5+
6+ __license__ = """
7+ This file is part of OpenModelica.
8+
9+ Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
10+ c/o Linköpings universitet, Department of Computer and Information Science,
11+ SE-58183 Linköping, Sweden.
12+
13+ All rights reserved.
14+
15+ THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE
16+ GPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2.
17+ ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
18+ RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3,
19+ ACCORDING TO RECIPIENTS CHOICE.
20+
21+ The OpenModelica software and the OSMC (Open Source Modelica Consortium)
22+ Public License (OSMC-PL) are obtained from OSMC, either from the above
23+ address, from the URLs: http://www.openmodelica.org or
24+ http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica
25+ distribution. GNU version 3 is obtained from:
26+ http://www.gnu.org/copyleft/gpl.html. The New BSD License is obtained from:
27+ http://www.opensource.org/licenses/BSD-3-Clause.
28+
29+ This program is distributed WITHOUT ANY WARRANTY; without even the implied
30+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS
31+ EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE
32+ CONDITIONS OF OSMC-PL.
33+ """
34+
35+ import shutil
36+ import abc
37+ import getpass
38+ import logging
39+ import json
40+ import os
41+ import psutil
42+ import shlex
43+ import signal
44+ import subprocess
45+ import sys
46+ import tempfile
47+ import time
48+ import uuid
49+ import pyparsing
50+ import zmq
51+ import warnings
52+
53+ # TODO: replace this with the new parser
54+ from OMPython import OMTypedParser
55+ from OMPython import OMParser
56+
57+
58+ # define logger using the current module name as ID
59+ logger = logging .getLogger (__name__ )
60+
61+
62+ class DummyPopen ():
63+ pass
64+
65+
66+ class OMCSessionBase (metaclass = abc .ABCMeta ):
67+ pass
68+
69+
70+ class OMCSessionZMQ (OMCSessionBase ):
71+ pass
0 commit comments