rspet_server.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:RSPET 作者: panagiks 项目源码 文件源码
def installed_plugins(self):
        """List all plugins installed."""
        from os import listdir
        from fnmatch import fnmatch
        import compiler
        import inspect
        files = listdir('Plugins')
        try:
            files.remove('mount.py')
            files.remove('template.py')
        except ValueError:
            pass
        plugins = {}
        for element in files:
            if fnmatch(element, '*.py') and not fnmatch(element, '_*'):
                plug_doc = compiler.parseFile('Plugins/' + element).doc
                plug_doc = inspect.cleandoc(plug_doc)
                plugins[element[:-3]] = plug_doc # Remove .py)
        return plugins
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号