简体   繁体   中英

Remove path from Python exceptions

I have a very long path and thus errors from Python become very long, since the path is always printed like:

[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; ..............]

Is there any way to change this behaviour (eg by changing the Python source code) to not print the path?

That output is not produced by Python. It is produced by the Sublime build command.

Simply not run your code under Sublime, or customise the exec.py script to remove the debug it adds after running your script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM