[Tutor] Problem with Winpdb.
Steve Robb
stever at insightbb.com
Thu Oct 13 16:32:32 CEST 2005
Message: 5
Date: Thu, 13 Oct 2005 05:51:04 -0400
From: Kent Johnson <kent37 at tds.net>
Subject: Re: [Tutor] Problem with Winpdb.
Cc: tutor at python.org
Message-ID: <434E2E08.5080409 at tds.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Steve Robb wrote:
>> Can anyone point me to what the problem may be with running Winpdb?
>>
>> I am running Win98, unfortunately
>>
>> However, when I try,
>> ..\python _winpdb.py, from the same directory, I get the following
>> traceback.
>>
>> Traceback (most recent call last):
>> File "C:\Python24\Lib\site-packages\winpdb.py", line 607, in calc_path
>> app_data = os.environ['APPDATA']
>> File "C:\PYTHON24\lib\os.py", line 422, in __getitem__
>> return self.data[key.upper()]
>> KeyError: 'APPDATA'
>
>
winpdb seems to be looking for an environment variable (APPDATA) that is not supported on Win 98. As a workaround you could replace line 606 in C:\Python24\Lib\site-packages\winpdb.py which says
if os.name == 'nt':
with
if os.name == 'nt' and os.environ.has_key('APPDATA'):
This will make winpdb create its settings file in the current directory with the name winpdb_settings.cfg.
Reporting this as a bug on SourceForge is also a good idea.
Kent
Thanks Kent,
Worked like a chanp! Thanks so much for the help.
I will report the "bug" to SourceForge once they send me an account login.
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051013/4355773d/attachment.htm
More information about the Tutor
mailing list