tkunzip.py 文件源码

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

项目:hostapd-mana 作者: adde88 项目源码 文件源码
def run(argv=sys.argv):
    log.startLogging(file('tkunzip.log', 'w'))
    opt=TkunzipOptions()
    try:
        opt.parseOptions(argv[1:])
    except usage.UsageError, e:
        print str(opt)
        print str(e)
        sys.exit(1)

    if opt['use-console']:
        # this should come before shell-exec to prevent infinite loop
        return doItConsolicious(opt)              
    if opt['shell-exec'] or not 'Tkinter' in sys.modules:
        from distutils import sysconfig
        from twisted.scripts import tkunzip
        myfile=tkunzip.__file__
        exe=os.path.join(sysconfig.get_config_var('prefix'), 'python.exe')
        return os.system('%s %s --use-console %s' % (exe, myfile,
                                                     ' '.join(argv[1:])))
    return doItTkinterly(opt)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号