def reload_menu(): """Reload the Postproc menu.""" global DB close_menu() DB = pf.PF.get('__PostProcMenu_result__',None) print("Current database %s" % DB) import plugins plugins.refresh('postproc_menu') show_menu()
def reload_menu(): """Reload the Postproc menu.""" global DB close_menu() DB = pf.PF.get('PostProcMenu_result', None) print("Current database %s" % DB) import plugins plugins.refresh('postproc_menu') show_menu()
def reload_menu(): """Reload the menu.""" before = pf.GUI.menu.nextitem(_menu) print "Menu %s was before %s" % (_menu,before) close_menu() import plugins plugins.refresh('draw2d') show_menu(before=before) setDrawOptions({'bbox':'last'}) print pf.GUI.menu.actionList()
def reload_menu(): """Reload the menu.""" before = pf.GUI.menu.nextitem(_menu) print("Menu %s was before %s" % (_menu,before)) close_menu() import plugins plugins.refresh('draw2d') show_menu(before=before) setDrawOptions({'bbox':'last'}) print(pf.GUI.menu.actionList())
def loadPlugin(self, pluginName): plugins.refresh() if not self.loadedPlugin(pluginName.lower()): if not self.pluginExists(pluginName.lower()): self.prnt("No such plugin " + pluginName) return pClass = plugins.getPlugin(pluginName.lower()) self.plugins[pluginName.lower()] = pClass(self.server)
def loadPlugin(self, pluginName): plugins.refresh() if not self.loadedPlugin(pluginName.lower()): if not self.pluginExists(pluginName.lower()): err = "No such plugin." return err pClass = None try: pClass = plugins.getPlugin(pluginName.lower()) except Exception, e: err = "Cannot load plugin "+pluginName+" ("+e.__class__.__name__+": "+e.__str__()+")" print(err) return err try: self.plugins[pluginName.lower()] = pClass(self.server) except Exception, e: err = "Could not initialize "+pluginName+" ("+e.__class__.__name__+": "+e.__str__()+")" print(err) return err
def reload_menu(): """Reload the Postproc menu.""" from plugins import refresh close_menu() refresh('geometry_menu') show_menu()
def reload_menu(): """Reload the menu.""" from plugins import refresh close_menu() refresh(_menu) show_menu()