problem with pydoc under python 2.6.1

steve.ferg.bitbucket at steve.ferg.bitbucket at
Fri Mar 6 02:30:02 CET 2009

Problem solved

Yinon's messages prompted me to take another look at my own code
(below).  I realized that in the batch file I am looking for
in different locations for Python25 and Python26, but I am executing
python.exe without changing the path.  Which means that I am executing
the same version of Python in both cases.

 @echo on
 set pyver=python25
 python c:\%pyver%\Lib\ -w easygui

 set pyver=python26
 python c:\%pyver%\Lib\ -w easygui

The path was pointing to Python25, so when I ran against the 2.5
version of Pydoc it worked fine; when I ran against the 2.6 version of
Pydoc, I got an error.

I modified my batch file to also reset the PATH after pyver was set,
and then Pydoc worked fine in both cases.

Maybe somebody out there will find this an instructive mistake.  My
thanks to Yinon; certainly for me his mistake was an instructive one.

More information about the Python-list mailing list