generator exceptions

Alexandru Mosoi brtzsnr at
Fri Sep 19 15:40:00 CEST 2008

i have a generator that raises an exception when calling next(),
however if I try to catch the exception and print the traceback i get
only the line where next() was called

while True:
  except StopIteration:
  except Exception, e:

how do I get the traceback starting from where exception was raised in
first place?

More information about the Python-list mailing list