<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">Message: 5
Date: Thu, 13 Oct 2005 05:51:04 -0400
From: Kent Johnson <a class="moz-txt-link-rfc2396E"
 href="mailto:kent37@tds.net">&lt;kent37@tds.net&gt;</a>
Subject: Re: [Tutor] Problem with Winpdb.
Cc: <a class="moz-txt-link-abbreviated" href="mailto:tutor@python.org">tutor@python.org</a>
Message-ID: <a class="moz-txt-link-rfc2396E"
 href="mailto:434E2E08.5080409@tds.net">&lt;434E2E08.5080409@tds.net&gt;</a>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Steve Robb wrote:
</pre>
<blockquote type="cite">
  <pre wrap=""><span class="moz-txt-citetags">&gt; </span>Can anyone point me to what the problem may be with running Winpdb?
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>I am running Win98, unfortunately
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>However, when I try,
<span class="moz-txt-citetags">&gt; </span>..\python _winpdb.py, from the same directory, I get the following 
<span class="moz-txt-citetags">&gt; </span>traceback.
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>Traceback (most recent call last):
<span class="moz-txt-citetags">&gt; </span>  File "C:\Python24\Lib\site-packages\winpdb.py", line 607, in calc_path
<span class="moz-txt-citetags">&gt; </span>    app_data = os.environ['APPDATA']
<span class="moz-txt-citetags">&gt; </span>  File "C:\PYTHON24\lib\os.py", line 422, in __getitem__
<span class="moz-txt-citetags">&gt; </span>    return self.data[key.upper()]
<span class="moz-txt-citetags">&gt; </span>KeyError: 'APPDATA'
  </pre>
</blockquote>
<pre wrap=""><!---->
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
</pre>
</body>
</html>