Version 12 (modified by Alec Thomas, 12 years ago) (diff)


Python documentation plugin

Notice: This plugin is unmaintained and available for adoption.


This plugin allows the user to browse Python documentation through Trac's interface.


Use pydoc:object to link to the documentation for object.

Inline Expansion of Python Documentation

The [[pydoc(target[,visibility])]] macro will expand the documentation for object inline.

visibility can be either public, private or left empty, in which case the visibility depends on the [pydoc] show_private setting.

Searching the Python Documentation

Documentation searches use the same mechansim as pydoc -k. Not ideal, but sufficient.


All configuration occurs under the [pydoc] section of trac.ini.

Documentation Search Path

The Python documentation will only be displayed for builtin modules and for the modules listed in the sys.path configuration option (use the os.pathsep character in order to separate the paths).

If the configuration key is not set, the sys.path variable value will be used.

In addition, the index can also be filtered through an include/exclude list. This is a glob, so you will need appropriate wildcards to match correctly. For example, to display all DBM modules except anydbm:

include = *dbm*
exclude = *anydbm*

Display Private Documentation

Added show_private configuration setting for [pydoc].

The Python private documentation can now be displayed for the modules that are found in this space separated list of module patterns.

e.g. in order to show the private documentation for Trac and the WebAdmin plugin:

show_private = trac.*  webadmin.*

Bugs/Feature Requests

Existing bugs and feature requests for PyDocPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:pydocplugin here].


You can check out PyDocPlugin from here using Subversion, or browse the source with Trac.


Use pydoc:trac to view the Python documentation for Trac.

Use [[pydoc(os.path.isdir)]] to inline the documentation for os.path.isdir().


Author: athomas
Contributors: cboos