Catching class exceptions

Fredrik Lundh fredrik at effbot.org
Sun Nov 12 15:47:24 EST 2000


Simon Foster wrote:
> AttributeError: GetoptError
> >>>
>
> What am I doing wrong?  Is there a special syntax for class errors? Is
> the documentation for the getopt module out of date?

works for me...

maybe PythonWin is picking up an old version of getopt.py?

try printing getopt.__file__ just after you've imported it, to
make sure you're using the 2.0 version of the file...

</F>





More information about the Python-list mailing list