Catching class exceptions

Fredrik Lundh fredrik at
Sun Nov 12 21:47:24 CET 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

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


More information about the Python-list mailing list