def getInfosDictFromPlugin(self, dirpath, filename):
        """
        Returns the extracted plugin informations as a dictionary.
        This function ensures that "name" and "path" are provided.
        """
        # use the filename alone to extract minimal informations.
        infos = {}
        module_name = os.path.splitext(filename)[0]
        plugin_filename = os.path.join(dirpath,filename)
        if module_name == "__init__":
            module_name = os.path.basename(dirpath)
            plugin_filename = dirpath
        infos["name"] = "%s" % module_name
        infos["path"] = plugin_filename
        cf_parser = ConfigParser()
        cf_parser.add_section("Core")
        cf_parser.set("Core","Name",infos["name"])
        cf_parser.set("Core","Module",infos["path"])
        return infos,cf_parser
dataset/ETHPy150Open datamachine/telex/telex/plugin/PluginFileLocator.py/PluginFileAnalyzerMathingRegex.getInfosDictFromPlugin/original