Index: gc_core/py/lang_core/gc_engine.py ================================================================== --- gc_core/py/lang_core/gc_engine.py +++ gc_core/py/lang_core/gc_engine.py @@ -26,17 +26,18 @@ pkg = "${implname}" name = "${name}" version = "${version}" author = "${author}" -# grammar rules and dictionary -_sContext = "" # what software is running -_rules = None # module gc_rules +_rules = None # module gc_rules + +# data +_sAppContext = "" # what software is running _dOptions = None _aIgnoredRules = set() _oDict = None -_dAnalyses = {} # cache for data from dictionary +_dAnalyses = {} # cache for data from dictionary #### Parsing @@ -286,15 +287,15 @@ _createError = _createDictError def load (sContext="Python"): global _oDict - global _sContext + global _sAppContext global _dOptions try: _oDict = IBDAWG("${dic_name}.bdic") - _sContext = sContext + _sAppContext = sContext _dOptions = dict(gc_options.getOptions(sContext)) # duplication necessary, to be able to reset to default except: traceback.print_exc() @@ -312,11 +313,11 @@ def getOptions (): return _dOptions def getDefaultOptions (): - return dict(gc_options.getOptions(_sContext)) + return dict(gc_options.getOptions(_sAppContext)) def getOptionsLabels (sLang): return gc_options.getUI(sLang) @@ -327,11 +328,11 @@ echo("") def resetOptions (): global _dOptions - _dOptions = dict(gc_options.getOptions(_sContext)) + _dOptions = dict(gc_options.getOptions(_sAppContext)) def getDictionary (): return _oDict