global exception catching
Rene Pijlman
reageer.in at de.nieuwsgroep
Thu Feb 27 02:32:26 EST 2003
Hilbert:
>Is there a way to catch a "global" exception in a python
>program (meaning that if there would be an error
>during execution it could call a function before exiting)?
How is that different from regular exception handling?
>I have a program that creates large temp files and in case
>of any unforseen problems I still need to clean up before
>exiting.
Use finally. See "8.6 Defining Clean-up Actions" on
http://www.python.org/doc/current/tut/node10.html#SECTION0010300000000000000000
--
René Pijlman
Wat wil jij leren? http://www.leren.nl
More information about the Python-list
mailing list