def refresh_files(self):
plugins = {}<EOL>_plugin_files = glob.glob(os.path.join(self.dir_path, '<STR_LIT>'))<EOL>for f in glob.glob(os.path.join(self.dir_path, '<STR_LIT>')):<EOL><INDENT>if not any(os.path.splitext(f)[<NUM_LIT:0>] == os.path.splitext(x)[<NUM_LIT:0>]<EOL>for x in _plugin_files):<EOL><INDENT>logging.debug('<STR_LIT>'.format(f))<EOL>_plugin_files.append(f)<EOL><DEDENT><DEDENT>for f in _plugin_files:<EOL><INDENT>plugin = self._load_compiled(f)<EOL>plugins[plugin.__name__] = plugin<EOL>logging.debug('<STR_LIT>'.format(f))<EOL><DEDENT>return plugins<EOL>
Discovers the available plugins and turns each into a module object.
This is a seperate function to allow plugins to be updated
dynamically by other parts of the application.