Just barely looked the code answer: check you scope on the second try block.
if that doesn't work... I'll read it for real :) Try PyDev plugin with eclipse - it's served me fairly well, but I did come from Java - so I'm an eclipse fan already. -- http://mail.python.org/mailman/listinfo/python-list