sys.tracebacklimit not working in Python 3.2?

Thorsten Kampe thorsten at thorstenkampe.de
Fri May 27 16:38:50 EDT 2011


Hi,

> type test.py
import sys

sys.tracebacklimit = 0
import doesnotexist

> python test.py
ImportError: No module named doesnotexist

> python3 test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    import doesnotexist
ImportError: No module named doesnotexist

The 3.2 documentation says "When set to 0 or less, all traceback 
information is suppressed and only the exception type and value are 
printed". Bug?

Thorsten



More information about the Python-list mailing list