def load_plugin_configuration(): #path): if __debug__: import time start = time.clock() path = config.plugin_path for dir in path: # XXX unix specific if len(dir) >= 2 and dir[-1] == '/': if dir[-2] == '/': recurse = -1 else: recurse = 1 else: recurse = 0 _search_dir(dir, recurse) if __debug__: pdebug('timing', 'time to scan cfg files: %g', time.clock() - start) # rearrange import plugins to ensure that native format is first for loader in import_plugins: if loader.format_name == NativeFormat: import_plugins.remove(loader) import_plugins.insert(0, loader)
def load_plugin_configuration(): #path): if __debug__: import time start = time.clock() path = config.plugin_path for dir in path: # XXX unix specific if len(dir) >= 2 and dir[-1] == '/': if dir[-2] == '/': recurse = -1 else: recurse = 1 else: recurse = 0 _search_dir(dir, recurse) if __debug__: pdebug('timing', 'time to scan cfg files: %g', time.clock()-start) # rearrange import plugins to ensure that native format is first for loader in import_plugins: if loader.format_name == NativeFormat: import_plugins.remove(loader) import_plugins.insert(0, loader)
def add_message(self, message): pdebug(('load', 'echo_messages'), message) self.messages[message] = self.messages.get(message, 0) + 1