如何让 pydoc 命令在 Windows 中工作?

2023-10-19Python开发问题
3

本文介绍了如何让 pydoc 命令在 Windows 中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

pydoc 在 Windows 中不起作用.在这篇文章 Pydoc is not working (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:Python27Libpydoc.py %*

创建 pydoc.bat 后,应该将其放置在何处以便 pydoc 命令在命令提示符下工作?

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

PSC:python27Libpydoc.py 添加到系统环境变量中的 Windows 路径不起作用.即使在注销并重新登录后它也不起作用.

PS adding C:python27Libpydoc.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:python27Libpydoc.py 添加到系统环境变量中的 Windows 路径不起作用.即使在注销并重新登录后它也不起作用.

PS adding C:python27Libpydoc.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:python27Lib 添加到你的 PATH 中(不包括 filename).

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

至于您创建的 pydoc.bat 文件,放置它的一个地方是通常添加到您的 C:python27Scripts 目录PATH 由 python 安装(因为该文件夹包含您可能希望在命令行中可用的其他脚本).

As for the pydoc.bat file you've created, one place to put it would be the C:python27Scripts 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 中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

在xarray中按单个维度的多个坐标分组
groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)...
2024-08-22 Python开发问题
15

Pandas中的GROUP BY AND SUM不丢失列
Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)...
2024-08-22 Python开发问题
17

GROUP BY+新列+基于条件的前一行抓取值
Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)...
2024-08-22 Python开发问题
18

PANDA中的Groupby算法和插值算法
Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)...
2024-08-22 Python开发问题
11

PANAS-基于列对行进行分组,并将NaN替换为非空值
Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)...
2024-08-22 Python开发问题
10

按10分钟间隔对 pandas 数据帧进行分组
Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)...
2024-08-22 Python开发问题
11