t:plugin_skeleton_py@ from olexFunctions import OlexFunctions OV = OlexFunctions() import os import htmlTools import olex import olx import gui import time debug = bool(OV.GetParam("olex2.debug", False)) 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.sep.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('%(name)s_plugin_path', p_path) from PluginTools import PluginTools as PT class %(name)s(PT): def __init__(self): super(%(name)s, 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.print_version_date() if not from_outside: self.setup_gui() OV.registerFunction(self.print_formula,True,"%(name)s") # END Generated ======================================= def print_formula(self): formula = {} for element in str(olx.xf.GetFormula('list')).split(','): element_type, n = element.split(':') print("%%s: %%s" %%(element_type, n)) formula.setdefault(element_type, float(n)) %(name)s_instance = %(name)s() print("OK.") @ t:plugin_skeleton_phil@ %(name_lower)s{ gui{ location = 'tools' .type = str .help = The tab item where the %(name)s GUI shall appear. before = 'images' .type = str .help = The tool before which the %(name)s GUI shall appear. } } @ t:plugin_skeleton_html{