driver_help.py 文件源码

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

项目:pyomo 作者: Pyomo 项目源码 文件源码
def help_checkers():
    import pyomo.environ
    import pyomo.util.plugin
    from pyomo.checker import IModelChecker
    wrapper = textwrap.TextWrapper()
    wrapper.initial_indent = '      '
    wrapper.subsequent_indent = '      '
    print("")
    print("Pyomo Model Checkers")
    print("--------------------")
    ep = pyomo.util.plugin.ExtensionPoint(IModelChecker)
    tmp = {}
    for checker in ep.extensions():
        for alias in getattr(checker, '_factory_aliases', set()):
            tmp[alias[0]] = alias[1]
    for key in sorted(tmp.keys()):
        print("  "+key)
        print(wrapper.fill(tmp[key]))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号