浏览 python api 的其他方法

发布于 2024-08-19 13:37:35 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

九公里浅绿 2024-08-26 13:37:35

我通常使用内置的pydoc,如果你在Windows上它应该被称为模块如果您使用的是 Linux,请使用 pydoc -p 8000 并通过浏览器连接。

I usually use the built-in pydoc, if you are on windows it should be called Module Docs if you are on linux use pydoc -p 8000 and connect through browser.

回忆追雨的时光 2024-08-26 13:37:35

来自命令行的 pydoc,来自交互式解释器提示符的 help()

pydoc from the command line, help() from the interactive interpreter prompt.

瞎闹 2024-08-26 13:37:35

pydoc -p 8080

python 社区对自动生成的文档持半敌对态度,尤其是面向对象的文档。 Python 不仅仅是面向对象的(它是一种多范式语言),因此 Python 开发人员通常更喜欢人工编写的文档。有时功能很重要,有时类结构也很重要。

pydoc -p 8080

The python community is semi-hostile to automatically generated documentation, especially if it's Object-Orientated. Python isn't just object-orientated (it's a multi-paradigm language), so Python developers generally prefer human-written documentation. Sometimes the functions are important, sometimes the Class structure is important.

暗喜 2024-08-26 13:37:35

您可以前往此处下载Python 3.1的chm版本。这样,搜索文档就应该很容易了。

you can go to here and download the chm version of Python 3.1. With that, searching through the docs should be easy.

自控 2024-08-26 13:37:35

很久以前,我曾经使用 Edgewall 的 python 侧边栏

这些天,我在谷歌上搜索 python 函数(标准文档几乎总是显示为第一个链接)。如果我想浏览模块的源代码(有时很有用),我会使用我编写的这个小 shell 函数。

epy () {
    cmd="import $1 as a ; print a.__file__.endswith('.pyc') and a.__file__[:-1] or a.__file__" 
    file=$(/usr/bin/env python -c $cmd) 
    echo $file
    emacsclient --no-wait $file
}

I used to use the python sidebar from Edgewall a long time ago.

These days, I google for the python function (the standard docs almost always show up as the first link).If I want to browse the source of the module (useful sometimes), I use this little shell function I wrote.

epy () {
    cmd="import $1 as a ; print a.__file__.endswith('.pyc') and a.__file__[:-1] or a.__file__" 
    file=$(/usr/bin/env python -c $cmd) 
    echo $file
    emacsclient --no-wait $file
}
最偏执的依靠 2024-08-26 13:37:35

我想我会被否决,但我发现 Sphinx 文档没有任何问题,而且我发现它们比 java 替代方案要好得多。

I guess I'm going to get downvoted but I find nothing wrong with the Sphinx docs and I find them way way better than the java alternative.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文