9 | | * Provides a `pydoc:object` link for linking to the documentation from other parts of Trac. |
10 | | * Includes a `[[pydoc(object)]]` macro for inlining documentation. |
11 | | * Lets you search the Python documentation from within Trac. |
| 11 | === Wiki Links === |
| 12 | |
| 13 | Use `pydoc:object` to link to the documentation for `object`. |
| 14 | |
| 15 | === Inline Expansion of Python Documentation === |
| 16 | |
| 17 | The `[[pydoc(target[,visibility])]]` macro will expand the documentation for `object` inline. |
| 18 | |
| 19 | `visibility` can be either `public`, `private` or left empty, in which case the visibility |
| 20 | depends on the [pydoc] show_private setting. |
| 21 | |
| 22 | === Searching the Python Documentation === |
| 23 | |
| 24 | Documentation searches use the same mechansim as `pydoc -k`. Not ideal, but sufficient. |
| 25 | |
| 26 | == Configuration == |
| 27 | |
| 28 | All configuration occurs under the [pydoc] section of `trac.ini`. |
| 29 | |
| 30 | === Documentation Search Path === |
| 31 | |
| 32 | The Python documentation will only be displayed for builtin modules and for |
| 33 | the modules listed in the `sys.path` configuration option (use the os.pathsep |
| 34 | character in order to separate the paths). |
| 35 | |
| 36 | If the configuration key is not set, the sys.path variable value will be |
| 37 | used. |
| 38 | |
| 39 | === Display Private Documentation === |
| 40 | |
| 41 | Added show_private configuration setting for [pydoc]. |
| 42 | |
| 43 | The Python private documentation can now be displayed for the modules |
| 44 | that are found in this space separated list of module patterns. |
| 45 | |
| 46 | e.g. in order to show the private documentation for Trac and the WebAdmin plugin: |
| 47 | |
| 48 | {{{ |
| 49 | [pydoc] |
| 50 | show_private = trac.* webadmin.* |
| 51 | }}} |