B
BigHand
Here is copy from my IDLE of python 3.0
a()
except:
exc_typ, exc_val, exc_tb = sys.exc_info()
File "<pyshell#14>", line 2, in <module>
File "<pyshell#6>", line 2, in a
File "<pyshell#9>", line 2, in b
but this doesn't output the cause/context like 2.6: or on the sample
of:
http://docs.python.org/3.0/library/...t=format_exception#traceback.format_exception
I want the exception printted like this:
File "<pyshell#14>", line 2, in <module> "a()"
File "<pyshell#6>", line 2, in a "b()"
File "<pyshell#9>", line 2, in b "return tuple()[0]"
how should I do?
return tuple()[0]
a()
except:
exc_typ, exc_val, exc_tb = sys.exc_info()
File "<pyshell#14>", line 2, in <module>
File "<pyshell#6>", line 2, in a
File "<pyshell#9>", line 2, in b
but this doesn't output the cause/context like 2.6: or on the sample
of:
http://docs.python.org/3.0/library/...t=format_exception#traceback.format_exception
I want the exception printted like this:
File "<pyshell#14>", line 2, in <module> "a()"
File "<pyshell#6>", line 2, in a "b()"
File "<pyshell#9>", line 2, in b "return tuple()[0]"
how should I do?