Message: 5
Date: Thu, 13 Oct 2005 05:51:04 -0400
From: Kent Johnson <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Problem with Winpdb.
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
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
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to