From e949c56f33d2cb70a311127f496fbb92d39143bc Mon Sep 17 00:00:00 2001 From: KingZero Date: Mon, 25 May 2009 22:45:44 +0200 Subject: changed variable names --- Core.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Core.py') diff --git a/Core.py b/Core.py index b585fd581..b847c1205 100644 --- a/Core.py +++ b/Core.py @@ -77,11 +77,11 @@ class Core(object): ## #self.import_needed_plugins() def create_plugin_index(self): - for file in glob(self.plugins_folder + sep + '*.py'): - if file != self.plugins_folder + sep + "Plugin.py": + for file_handler in glob(self.plugins_folder + sep + '*.py'): + if file_handler != self.plugins_folder + sep + "Plugin.py": plugin_pattern = "" - plugin_file = basename(file).replace('.py', '') - for line in open(file, "r").readlines(): + plugin_file = basename(file_handler).replace('.py', '') + for line in open(file_handler, "r").readlines(): try: plugin_pattern = re.search(r"self.plugin_pattern = r\"(.*)\"", line).group(1) break @@ -124,10 +124,10 @@ class Core(object): def get_avial_plugins(self, plugin_folder): """ searches the plugin-folder for plugins """ - for file in glob(plugin_folder + "/" + '*.py'): - print file - if file.endswith('.py') and file != plugin_folder + sep + "Plugin.py": - self.plugin_file = basename(file).replace('.py', '') + for file_handler in glob(plugin_folder + "/" + '*.py'): + print file_handler + if file_handler.endswith('.py') and file_handler != plugin_folder + sep + "Plugin.py": + self.plugin_file = basename(file_handler).replace('.py', '') print self.plugin_file self.new_plugin = __import__(self.plugin_file) print dir(self.new_plugin)[1].plugin_pattern -- cgit v1.2.3