[[PageOutline]] = Python documentation plugin = == Description == This plugin allows the user to browse Python documentation through Trac's interface, using the `pydoc` documentation system. It was originally written for Trac 0.9, but there's now a fully 0.10 compatible version, and even a Genshi version for Trac 0.11dev. == Alternatives to `pydoc` == Tools that use static code analysis would be much more preferable to those that compile the Python code and inspect the doc strings. Some tools that do this are [https://svn.enthought.com/enthought/wiki/EndoHowTo Endo] (promising), [http://effbot.org/zone/pythondoc.htm PythonDoc] (promising), [http://happydoc.sourceforge.net/ Happy Doc] and [http://codespeak.net/svn/user/mwh/pydoctor/trunk/ PyDoctor] (requires trunk version of some divmod modules, couldn't get it working). Others are [http://pudge.lesscode.org/ Pudge] and [http://epydoc.sourceforge.net/ EpyDoc]. [http://epydoc.sourceforge.net/ EpyDoc] is fully supported by EpyDocPlugin. == Usage == === Wiki Links === 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. == Configuration == 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: {{{ [pydoc] include = *dbm* exclude = anydbm }}} To display just the Trac documentation: {{{ [pydoc] include = trac trac.* }}} '''Note:''' You will need both `trac` and `trac.*` as browsing matches against the module name and searching matches against the full object name. === 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: {{{ [pydoc] show_private = trac.* webadmin.* }}} == Bugs/Feature Requests == Existing bugs and feature requests for PyDocPlugin are [report:9?COMPONENT=PyDocPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=PyDocPlugin&owner=athomas new ticket]. == Download == Download the zipped source corresponding to your Trac version: || Trac 0.9 || [download:pydocplugin/0.9 pydocplugin/0.9] || || Trac 0.10 || [download:pydocplugin/0.10 pydocplugin/0.10] || || Trac 0.11 || [download:pydocplugin/0.11 pydocplugin/0.11] || == Source == You can check out PyDocPlugin from [http://trac-hacks.org/svn/pydocplugin here] using Subversion, or [source:pydocplugin browse the source] with Trac. == Example == Use `pydoc:trac` to view the Python documentation for Trac. Use `[[pydoc(os.path.isdir)]]` to inline the documentation for `os.path.isdir()`. == Author/Contributors == '''Author:''' [wiki:athomas] [[BR]] '''Contributors:''' [wiki:cboos] [[BR]] [[TagIt(plugin,athomas,0.9,0.10,cboos)]]