我的路径很长,因此Python的错误会变得很长,因为路径总是像这样打印:
[Finished in 31.3s with exit code 4294967295]
[shell_cmd: python -u "C:\work\test.py"]
[dir: C:\work\]
[path: C:\Python27\Lib\site-packages\PyQt4; ..............]
有什么方法可以更改此行为(例如,通过更改Python源代码)以不打印路径?
最佳答案
该输出不是Python产生的。它是由Sublime build命令生成的。
根本不要在Sublime或customise the exec.py
script下运行代码,以删除运行脚本后添加的调试。
关于python - 从Python异常中删除路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32413770/