Skip to content

Commit

Permalink
Changed OMPython version from 1.0 to 2.0
Browse files Browse the repository at this point in the history
- The 2.0 version uses session (OMCSession objects) instead of a global object created when importing OMPython


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20993 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 5, 2014
1 parent 63f1650 commit 4015c50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Examples/generate_icons.py
Expand Up @@ -39,7 +39,8 @@
from optparse import OptionParser

import svgwrite
import OMPython
from OMPython import OMCSession
OMPython = OMCSession()

# OpenModelica setup commands
OMC_SETUP_COMMANDS = ['setCommandLineOptions("+d=nogen,noevalfunc")']
Expand Down Expand Up @@ -1132,7 +1133,7 @@ def main():
output_dir = options.output_dir
with_html = options.with_html
includeInvisibleText = options.includeInvisibleText

# create logger with 'spam_application'
global logger
logger = logging.getLogger(os.path.basename(__file__))
Expand All @@ -1157,7 +1158,7 @@ def main():
PACKAGES_TO_LOAD_FROM_FILE = []
PACKAGES_TO_GENERATE = PACKAGES_TO_LOAD


logger.info('Application started')
logger.info('Output directory: ' + output_dir)

Expand Down

0 comments on commit 4015c50

Please sign in to comment.