示例#1
0
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)
示例#2
0
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)
示例#3
0
文件: load.py 项目: shumik/skencil-c
    def add_message(self, message):
	pdebug(('load', 'echo_messages'), message)
	self.messages[message] = self.messages.get(message, 0) + 1
示例#4
0
 def add_message(self, message):
     pdebug(('load', 'echo_messages'), message)
     self.messages[message] = self.messages.get(message, 0) + 1