views:

102

answers:

2

pydoc does not work in Windows. at this post http://stackoverflow.com/questions/3391998/pydoc-is-not-working-windows-xp the last answer by dave webb says to create a pydoc.bat file with this code in it:

@python c:\Python27\Lib\pydoc.py %*

After I create pydoc.bat where should it be placed so the pydoc command works in the command prompt?

PS adding C:\python27\Lib\pydoc.py to the Windows path in the system environment variables does not work. Even after logging out and back in it does not work.

A: 

put it in any folder that is in your PATH. Example: C:\Windows\System32

Alternatively, you can put it anywhere, and then add the folder it is in to windows PATH

nosklo
+1  A: 

PS adding C:\python27\Lib\pydoc.py to the Windows path in the system environment variables does not work. Even after logging out and back in it does not work.

The PATH environment variable is a list of directories to search for a given executable. So you should be adding C:\python27\Lib to your PATH (not including the filename).

As for the pydoc.bat file you've created, one place to put it would be the C:\python27\Scripts directory which is usually added to your PATH by the python installation (since that folder contains miscellaneous scripts that you might like available at the command line).

ars
the only Scripts folder I found is in C:\python27\Tools\Scripts. is this the same one you are referring to?
J3M 7OR3
That sounds right -- I have python 2.5, so it may have changed. That should probably be in your path already, or you can put it there if it isn't.
ars
@ars it worked but to get it to work I had to place pydoc.bat in C:\python27\Tools\Scripts not C:\python27\Scripts cause that DIR doesn't exist for me. thanks :)
J3M 7OR3