python - 如何使用 python 控制台搜索帮助

标签 python

有没有办法在 Python 控制台中使用关键字搜索特定的包/函数?

例如,我可能想在“pdf”中搜索与 pdf 相关的任务。

最佳答案

pydoc -k 标志搜索文档。

pydoc -k <keyword>
    Search for a keyword in the synopsis lines of all available modules.

从终端运行..

$ pydoc -k pdf

..例如:

$ pydoc -k pdf
PdfImagePlugin 
wx.lib.pdfwin 
PIL.PdfImagePlugin

它不搜索文档的内容,但它搜索所有模块名称 - 如果这还不够,我建议使用 Google 或 StackOverflow 搜索“Python PDF 模块”或类似内容

关于python - 如何使用 python 控制台搜索帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/969093/

相关文章:

python - tornadoweb 的配置失败 nginx 设置,未知指令 "user"

python - 运行 Python 脚本来读取信息。来自每 1 秒在已知位置生成的新 .txt 文件

python - Django is_ajax 历史返回

python - 在没有真实索引的情况下 reshape Pandas 数据框

python - Win&X11 中的全局热键

python - 为随机选择的单词中的字母创建空格

python - 从python内存中的MPEG(.ts)文件中提取音频,而不将MPEG写入文件

python Pandas如何根据下一行(在特定时间范围内)从数据帧中删除行

python - Pandas 数据帧 : Convert Integer time hh:mm

python - 上传二进制文件。编码问题