Message164718
Consider the following code:
from thread import start_new
def f(): typo #there is no variable called typo
start_new(f, ())
If run from the command line, this produces a traceback. If run from IDLE, it does not. I suspect this is not by design. This caused me endless grief in debugging until one happy day I discovered the traceback module. I now write:
from thread import start_new
from traceback import print_exc
def f():
try: typo
except: print_exc()
start_new(f, ())
this works, but I wish I didn't need it. |
|
Date |
User |
Action |
Args |
2012-07-06 08:28:13 | Mark | set | recipients:
+ Mark |
2012-07-06 08:28:13 | Mark | set | messageid: <1341563293.08.0.285980110052.issue15262@psf.upfronthosting.co.za> |
2012-07-06 08:28:12 | Mark | link | issue15262 messages |
2012-07-06 08:28:12 | Mark | create | |
|