site.py 文件源码

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

项目:build-calibre 作者: kovidgoyal 项目源码 文件源码
def main():
    global __file__

    # Needed on OS X <= 10.8, which passes -psn_... as a command line arg when
    # starting via launch services
    for arg in tuple(sys.argv[1:]):
        if arg.startswith('-psn_'):
            sys.argv.remove(arg)

    base = sys.resourcepath
    sys.frozen = 'macosx_app'
    sys.new_app_bundle = True
    abs__file__()

    add_calibre_vars(base)
    addsitedir(sys.site_packages)

    if sys.calibre_is_gui_app and not (
            sys.stdout.isatty() or sys.stderr.isatty() or sys.stdin.isatty()):
        nuke_stdout()

    return run_entry_point()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号