From 887e8d55f7aa73885458d4220ad9d4bfcae55ac0 Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Tue, 19 Jan 2016 11:40:50 +0100 Subject: [PATCH] Make all installed io profiles work with rule based processor --- scripts/ost_startup.py.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/ost_startup.py.in b/scripts/ost_startup.py.in index 73cf24e88..612b6485c 100644 --- a/scripts/ost_startup.py.in +++ b/scripts/ost_startup.py.in @@ -30,20 +30,21 @@ _site_packs='python%d.%d/site-packages' % sys.version_info[0:2] _base_dir=os.getenv('DNG_ROOT') sys.path.insert(0, os.path.join(_base_dir, '@LIBDIR@', _site_packs)) -from ost import * -import ost +from ost import SetPrefixPath, GetSharedDataPath, conop -ost.SetPrefixPath(_base_dir) +SetPrefixPath(_base_dir) def _InitRuleBasedProcessor(): - compound_lib_path=os.path.join(ost.GetSharedDataPath(), 'compounds.chemlib') + compound_lib_path=os.path.join(GetSharedDataPath(), 'compounds.chemlib') if os.path.exists(compound_lib_path): compound_lib=conop.CompoundLib.Load(compound_lib_path) conop.SetDefaultLib(compound_lib) - io.profiles['DEFAULT'].processor = conop.RuleBasedProcessor(compound_lib) # switch to rule-based processor, if compound library is available _InitRuleBasedProcessor() +from ost import * +import ost + import os.path HistoryFile=os.path.expanduser('~/.ost_history') -- GitLab