1 Star 0 Fork 0

stoneqp/pdbpp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pdbpp_hijack_pdb.pth 736 Bytes
一键复制 编辑 原始数据 按行查看 历史
Daniel Hahler 提交于 2020-02-17 00:13 . Revisit/improve pth hack (#363)
# This script is used by Python's site module.
# Doc: https://docs.python.org/3/library/site.html
# Code: https://github.com/blueyed/cpython/blob/1b293b600/Lib/site.py#L148-L187
#
# Add our "_pdbpp_path_hack" to the beginning of `sys.path` if:
# 1. the environment variable PDBPP_HIJACK_PDB is trueish (as an int), defaults to 1.
# i.e. PDBPP_HIJACK_PDB=0 can be used to disable it.
# 2. there is not another one already at the beginning
# (e.g. via a virtualenv using "include-system-site-packages")
import os; _pdbpp_path = os.path.sep + "_pdbpp_path_hack"
import sys; sys.path.insert(0, makepath(sitedir, "_pdbpp_path_hack")[0]) if int(os.environ.get('PDBPP_HIJACK_PDB', 1)) and not sys.path[0].endswith(_pdbpp_path) else None
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/stoneqp/pdbpp.git
git@gitee.com:stoneqp/pdbpp.git
stoneqp
pdbpp
pdbpp
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385