problem with pydoc under python 2.6.1

steve.ferg.bitbucket at gmail.com steve.ferg.bitbucket at gmail.com
Thu Mar 5 20:30:02 EST 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 pydoc.py
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\pydoc.py -w easygui

 set pyver=python26
 python c:\%pyver%\Lib\pydoc.py -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