How to use sys.exc_info()???
Aahz Maruch
aahz at panix.com
Wed Oct 18 19:32:07 EDT 2000
In article <8sksit$mj1$1 at panix6.panix.com>, Roy Smith <roy at panix.com> wrote:
>
>I'm stuped with how sys.exc_info() is supposed to work. If I do:
>
>open ('xxx')
>
>I get:
>
>Traceback (innermost last):
> File "<stdin>", line 1, in ?
>IOError: [Errno 2] No such file or directory: 'xxx'
>
>Which is what I expect. But when I do:
>
>try:
> open ('xxx')
>except:
> foo = sys.exc_info()
Use the traceback module.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"real love can't be explained by simplistic platitudes." --piranha
More information about the Python-list
mailing list