AttributeError: 'getopt' module has no attribute 'GetoptError'
Travis Shirk
travis at puddy.lan.kerrgulch.net
Thu Feb 14 18:48:12 EST 2002
Karl M. Syring <syring at email.com> wrote:
> "Travis Shirk" <travis at puddy.lan.kerrgulch.net> schrieb
>> Gustaf Liljegren <gustafl at algonet.se> wrote:
>> > Erno Kuusela <erno-news at erno.iki.fi> wrote:
>>
>> >>> I use Python 2.1 on Win98. Try to use the getopt module, but get
>> >>> the error in the subject line. What's wrong?
>>
>> >>your test program isn't called "getopt.py" by any chance?
>>
>> > Oh. Yes, it is... Thank you.
>>
>> I'm having the exact same problem as Gustaf, and
>> my program is *not* called getopt.py. Anyone know what the
>> the AttibuteError is all about?
> There is not accidentally a file getopt.pyc laying around?
Well actually, there is. I'm running Red Hat 7.2 and I've
got python and python2 rpms installed. My script starts
with '#!/usr/bin/python', but when I change it to python2,
I don't get the AttributeError when the exception is caught.
<sigh>
I thought that python and python2 knew not to step on each
others toes, evidently I was wrong. I'd rather not hardcode
'python2' into my script, but I guess I have no choice.
I've not followed the python 2 development closely, but is
there any reason to keep 1.5.x installed?
Thanks for your help.
> Once bitten, twice shy
> Karl M. Syring
More information about the Python-list
mailing list