def load (self, path, name, klass): # Aggiungiamo la path old = sys.path sys.path.append (path) #utils.c_warn ("Carico il modulo senza try/except.. fixami prima della revisione finale") try: module = __import__ (name)#, globals (), locals (), [klass]) instance = vars(module)[klass] for i in self.array: if i.__class__ == instance: return False plugin = instance () # Roba di preferenze... raccomandati di merda -.- gh for i in plugin.__preferences__: ret = impostazioni.get (i) if ret == None: impostazioni.set (i, plugin.__preferences__[i]) else: if type (ret) == type (plugin.__preferences__[i]): plugin.__preferences__[i] = ret plugin.start () self.array.append (plugin) sys.path = old return True except: utils.c_warn ("Restoring path") sys.path = old utils.c_error ("!! %s::%s (%s)" % (klass, sys.exc_value, sys.exc_type)) return False
def _set_store (self, x): utils.c_warn ("_set_store () called ... why?")
def _set_page_obj (self, x): utils.c_warn ("_set_page_obj () called ... why?")
def _set_filt (self, x): utils.c_warn ("_set_filt () called ... why?")
def _set_menu (self, x): utils.c_warn ("_set_menu () called ... why?")
def _set_vars (self, x): utils.c_warn ("_set_vars () called ... why?")
def _set_view (self, x): utils.c_warn ("_set_view () called ... why?")