Catching class exceptions

Simon Foster simon at uggs.demon.co.uk
Mon Nov 13 17:59:42 EST 2000


On Sun, 12 Nov 2000 20:47:24 GMT, "Fredrik Lundh" <fredrik at effbot.org>
wrote:

>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>
>

>>> getopt.__file__
'getopt.pyc'

I just get the name of the file.  No version or path info.
Still not much wiser.



--
Simon Foster
Cheltenham
England



More information about the Python-list mailing list