ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Py​DOC

by chrissimpkins ST2/ST3

A Sublime Text plugin that supports Python 2 & 3 documentation search from selections in the editor

Details

Installs

  • Total 5K
  • Win 2K
  • OS X 1K
  • Linux 1K
Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5
Windows 0 3 0 1 1 0 1 1 2 0 4 0 0 1 0 2 0 2 0 0 1 0 0 2 1 0 1 1 1 3 3 4 1 4 3 2 0 3 3 0 2 6 3 0 0 0
OS X 0 0 0 1 2 3 0 0 1 0 1 2 0 0 1 0 2 0 0 0 0 2 1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 2 1 0 0 2 2 1
Linux 0 0 0 2 4 0 1 2 1 0 1 1 0 1 2 0 1 2 1 1 0 0 2 1 0 1 1 0 1 1 3 0 1 2 1 2 1 0 1 1 0 0 1 0 2 2

Readme

Source
raw.​githubusercontent.​com

PyDOC

A Sublime Text 2/3 plugin that supports Python documentation search from selections in the editor.

About

PyDOC allows you to search Python 2 or Python 3 documentation on http://docs.python.org for built-in Python modules, classes, methods, and functions that are selected in the Sublime Text editor. A browser window is launched (in your default browser), using your selected text as the query term for the Python 2 or Python 3 documentation.

By default, the most recent Python 2 or Python 3 release documentation is used.

Install PyDOC

Using Sublime Package Control

PyDOC can be installed using Sublime Package Control. Open the command palette with:

Mac OSX
Cmd + Shift + P
Linux & Windows
Ctrl + Shift + P

Type install and select the menu item, Package Control: Install Package.

Type PyDOC and select the PyDOC package that is displayed. This will install the package in your editor.

Using Git

Use the Sublime Text menu items Preferences -> Browse Packages to locate your Packages directory.

Navigate to the directory in your terminal and clone the PyDOC source repository inside the Packages directory using the command:

git clone https://github.com/chrissimpkins/PyDOC.git "PyDOC"

Manual Install

Download the zip compressed archive from GitHub.

Decompress the zip archive and rename the directory PyDOC.

Open your Sublime Text Packages directory using the Preferences -> Browse Packages menu items.

Move the entire PyDOC directory into your Sublime Text Packages directory.

Use PyDOC

Search with Right Click Menu

Select a built-in Python object in your editor text, then use the Python 2 Doc Search or Python 3 Doc Search menu item in the right click menu.

Search with Keybinding

Select a built-in Python object in your editor text, then use one of the following keybindings to perform the search:

Python 2 Documentation Search Keybinding
Ctrl-2
Python 3 Documentation Search Keybinding
Ctrl-3

Search with the Command Palette

Select a built-in Python object in your editor text then enter the keybinding to open the command palette (see description above in the Sublime Package Control section). Type 'pydoc' and then select either Python 2 Doc Search (PyDOC) or Python 3 Doc Search (PyDOC).

Issues

Having a problem? Let's fix it. Here are a few steps that will lead to the most rapid fix:

  1. Make sure that you selected text in the editor before attempting to use PyDOC. It's not that good (yet…).

  2. Open the Sublime Text console with Ctrl-` or View -> Show Console, then run PyDOC again. It generally provides helpful hints for problems and any exceptions that are raised will be displayed.

  3. Submit the issue on the GitHub repository with as much detail as you can provide. Please paste the console ouptut for any exceptions that are raised.

Changes

v.1.2.3 - added PyDOC to main menu for access to README and keybindings

v1.2.2 - updated user status and error messages, added install docs

v1.2.1 - added horizontal bar dividers to the context menu

v.1.2.0 - updated Python 2 & 3 URL handling

v1.1.1 - modified ST3 URL encoding (Python 3)

v.1.1.0 - modified ST2 URL encoding (Python 2)

v.1.0.1 - updated menu items

v1.0.0 - initial release

License

MIT License