Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search python docs offline?

Tags:

python

offline

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?

like image 280
naught101 Avatar asked Oct 18 '13 03:10

naught101


People also ask

How do I look up a python document?

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(...)

Where is Python documentation stored?

Look in the python folder in the folder: Doc . This folder has the entire downloaded documentation of the python docs from python.org.

What is the best Python documentation?

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.


2 Answers

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.

like image 91
AHuman Avatar answered Oct 02 '22 19:10

AHuman


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 "/".

like image 44
Nicolas Barbey Avatar answered Oct 02 '22 21:10

Nicolas Barbey