akonsu wrote:
hello,

my script creates files that i need to delete if an exception is
thrown.

is this a good pythonic style to do this kind of cleanup in
sys.excepthook instead of inside except clause of a try block?

konstantin
def doIt():
   pass

try:
   doIt()
except Exception, exc:
   #cleaning up files



I mean, what is the problem with try except ? It's pythonic. If you tell us what wrong with it in your case, we may spend time on hacking sys.excepthook.

Jean-Michel
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to