scriptabit.py 文件源码

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

项目:scriptabit 作者: DC23 项目源码 文件源码
def __get_plugin_manager():
    """ Discovers and instantiates all plugins, returning a management object.

    Returns:
        yapsy.PluginManager: The plugin manager with the loaded plugins.
    """
    # Build the manager
    plugin_manager = PluginManager()

    # the location of the plugins that ship with scriptabit
    package_plugin_path = resource_filename(
        Requirement.parse("scriptabit"),
        os.path.join('scriptabit', 'plugins'))

    # user plugin location
    user_plugin_path = __init_user_plugin_directory()

    # Set plugin locations
    plugin_manager.setPluginPlaces([package_plugin_path, user_plugin_path])

    # Load all plugins
    plugin_manager.collectPlugins()

    return plugin_manager
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号