This is an old revision of the document!


Get instant documentation in Python

With the following recipe Geany can show a little popup window with documentation for the selected command or module in a Python file.

Installation

  • Python and PyGTK are required
  • Download the script from http://pydocw.googlecode.com/svn/trunk/pydocw to your system
  • Edit your filetypes.python filetype definition file:
  • Open ~/.config/geany/filedefs/filetypes.python
  • If it does not exist, create it with the following content:
[settings]
context_action_cmd = python /path/to/pydocw %s
  • If it already exists, find the line starting with context_action_cmd and edit like this:
context_action_cmd = python /path/to/pydocw %s
  • Restart Geany

Similar instructions can also be found on http://code.google.com/p/pydocw/

Usage

Select some string in Geany and right-click on it to choose 'Context Action' or, easier, use the configured shortcut for 'Context Action'. A little popup will open and show the Python documentation for the selected string.

There is a video on YouTube to demonstrate the usage of this little tool: http://www.youtube.com/watch?v=85RxqGRtDoA

Print/export