ptvs_virtualenv_proxy.py 文件源码

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

项目:Education-Explorer 作者: imbiswas 项目源码 文件源码
def get_venv_handler():
    log('Activating venv with executable at %s\n' % activate_this)
    import site
    sys.executable = activate_this
    old_sys_path, sys.path = sys.path, []

    site.main()

    sys.path.insert(0, '')
    for item in old_sys_path:
        if item not in sys.path:
            sys.path.append(item)

    log('Getting handler %s\n' % os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))
    handler = get_wsgi_handler(os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))
    log('Got handler: %r\n' % handler)
    return handler
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号