In python I can get some rudimentary documentation for any object using help(<object>)
. But to be able to search the documentation, I have to go online. This isn't really helpful if I'm somewhere where the internet isn't accessible.
In R, there is a handy double question mark feature (??<topic>
) that allows me to search through the documentation of all installed libraries for any function that includes <topic>
in its name or documentation string. Is there anything similar for python? Perhaps even just for loaded objects?
Python has a built-in help() function that can access this information and prints the results. For example, to see the documentation of the built-in len function, you can do the following: In [1]: help(len) Help on built-in function len in module builtins: len(...)
Look in the python folder in the folder: Doc . This folder has the entire downloaded documentation of the python docs from python.org.
Sphinx is far and away the most popular Python documentation tool. Use it. It converts reStructuredText markup language into a range of output formats including HTML, LaTeX (for printable PDF versions), manual pages, and plain text. There is also great, free hosting for your Sphinx docs: Read The Docs.
Look in the python folder in the folder: Doc
. This folder has the entire downloaded documentation of the python docs from python.org. I know this is a VERY late answer, but it brings up an easy solution.
pydoc comes with python and can do searches but only in the synopsis lines of available modules. Quoting pydoc --help
:
pydoc -k Search for a keyword in the synopsis lines of all available modules.
Note that into pydoc you can perform searches using "/".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With