tool.py 文件源码

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

项目:sequitur-g2p 作者: Holzhaus 项目源码 文件源码
def runMain(main, options, args):
    if options.profile:
    if True:
        import hotshot
        profile = hotshot.Profile(options.profile)
        profile.runcall(main, options, args)
        profile.close()
        import hotshot.stats
        stats = hotshot.stats.load(options.profile)
    else:
        import profile
        profile.run('main(options, args)', options.profile)
        import pstats
        stats = pstats.Stats(options.profile)
    stats.strip_dirs()
    stats.sort_stats('time', 'calls')
    stats.print_stats(20)
    elif options.psyco:
    import psyco
    psyco.full()
    status = main(options, args)
    else:
    status = main(options, args)
    return status
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号