import os import olex_core import gui from olexFunctions import OV debug = OV.IsDebugging() if OV.HasGUI(): get_template = gui.tools.TemplateProvider.get_template instance_path = OV.DataDir() try: from_outside = False p_path = os.path.dirname(os.path.abspath(__file__)) except: from_outside = True p_path = os.path.dirname(os.path.abspath("__file__")) l = open(os.path.join(p_path, 'def.txt')).readlines() d = {} for line in l: line = line.strip() if not line or line.startswith("#"): continue d[line.split("=")[0].strip()] = line.split("=")[1].strip() p_name = d['p_name'] p_htm = d['p_htm'] p_img = eval(d['p_img']) p_scope = d['p_scope'] OV.SetVar('HARp_plugin_path', p_path) from PluginTools import PluginTools as PT from gui.images import GuiImages GI=GuiImages() class HARp(PT): def __init__(self): super(HARp, self).__init__() self.p_name = p_name self.p_path = p_path self.p_scope = p_scope self.p_htm = p_htm self.p_img = p_img self.deal_with_phil(operation='read') self.jobs = [] self.parallel = False self.softwares = "" self.wfn_2_fchk = "" if not from_outside: self.setup_gui() return HARp_instance = HARp() #print "OK."