launch.py 文件源码

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

项目:rwt 作者: jaraco 项目源码 文件源码
def _inject_sitecustomize(target):
    """
    Create a sitecustomize file in the target that will install
    the target as a sitedir.

    Only needed on Python 3.2 and earlier to workaround #1.
    """
    if sys.version_info > (3, 3):
        return

    hook = textwrap.dedent("""
        import site
        site.addsitedir({target!r})
        """).lstrip().format(**locals())
    sc_fn = os.path.join(target, 'sitecustomize.py')
    with open(sc_fn, 'w') as strm:
        strm.write(hook)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号