如何获取pydoc命令在Windows中工作? [英] How to get pydoc command working in Windows?
问题描述
pydoc
在Windows中不起作用。在此后 Pydoc不工作(Windows XP)最后一个答案dave webb说要用这个代码创建一个 pydoc.bat 文件:
pydoc
does not work in Windows. at this post 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 %*
创建pydoc.bat后,它被放置,因此 pydoc
命令在命令提示符下工作?
After I create pydoc.bat where should it be placed so the pydoc
command works in the command prompt?
C:\python27\Lib\pydoc.py
到系统环境变量中的Windows路径不起作用。即使退出后,它不工作。
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.
推荐答案
PS将C:\python27\Lib\pydoc.py添加到Windows路径在系统环境变量不工作。
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.
PATH
环境变量是搜索给定可执行文件的目录列表。因此,您应该将 C:\python27 \Lib
添加到您的 PATH
(不包括<
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).
至于您创建的 pydoc.bat
文件,它将是通过python安装通常添加到您的 PATH
的 C:\python27 \Scripts
目录(因为该文件夹包含您可能希望在命令行可用的其他脚本)。
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).
这篇关于如何获取pydoc命令在Windows中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!