Skip to content
Snippets Groups Projects
Commit 887e8d55 authored by Bienchen's avatar Bienchen
Browse files

Make all installed io profiles work with rule based processor

parent 5963bc07
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment