Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
执行摘要:NFS 上的 python lib,与 python 2.6 和 2.7 决斗。
上下文:几个小组维护自己的 python 解释器,但访问 NFS 服务器上的常用 python 库。
有没有一种简单的方法来构建 python 以便它忽略 pyc 文件?尝试确保每个脚本都使用-B选项执行是不切实际的。
-B
这似乎是查看是否存在导致 NFS 负载的文件的实际统计信息。
如果正在运行的最旧的 python 至少为 2.6,则不需要修补。
添加
import sys sys.dont_write_bytecode = True
到
site-packages/usercustomize.py