Search python docs offline?
This was mentioned in the comments already: Zeal is similar to Dash but for Windows/Linux. It uses the same sources as Dash. It's built using Qt and is available in the repositories for several distros, for Ubuntu there is a PPA. Download it here.
Zeal is a simple offline API documentation browser inspired by Dash (OS X app), available for Linux and Windows.
- Quickly search documentation using Alt+Space (or customised) hotkey to display Zeal from any place in your workspace.
- Search in multiple sets of documentation at once.
- Don't be dependent on your internet connection.
- Integrate Zeal with Emacs, Sublime Text, or Vim. See Usage » Editor plugins for details.
It is open source (GPL), development happens on GitHub. Zeal uses the same stylesheets/HTML as the online docs, so everything should look familiar.
An in-browser alternative is devdocs.io. You can access the website even if you are offline, provided that you've marked them for local offline storage. You'll need to enable the Python 2 docs, and then mark them for offline storage here. However, as a longtime user of the online Python docs, I find the custom stylesheet that DevDocs uses a bit distracting.
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 "/".
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.
Just to add another option for offline access of python docs (mostly core):
I don't have access to a linux computer at the moment, but on windows, you can navigate to your_python_dist_folder/doc
to find some help files. Particularly python275.chm
for instance.
If there's no doc folder on your linux machine, you can download the file here and google for a linux chm viewer:
https://www.google.com/search?q=linux+chm+viewer
::Note:
Some distributions also include docs for other packages in there... might be worth a check. Other than that, help(module)
usually returns good information.
Edit:
You could get something that might be a little closer to what you want by using pydoc
. E.g. you are looking for something about sin
in the math module:
import math
import pydoc
[i for i in dir(math) if 'sin' in pydoc.getdoc(getattr(math,i))]
This would return the methods whose docstrings include sin
:
['acos', 'acosh', 'asin', 'asinh', 'cos', 'cosh', 'isinf', 'sin', 'sinh']
for which you then could run the help()
function