pydoc

Can pydoc generate subdirectories?

Is there any way to get pydoc's writedocs() function to create subdirectories for packages? For instance, let's say I have the following modules to document: foo.py dir/bar.py dir/init.py When I run pydoc.writedocs(), I get the following files: foo.html dir.bar.html I would like to get: foo.html dir/bar.html Is there any w...

Where does pythons pydoc help function get its content from.

I have a lot of callable objects and they all have the __doc__ string correctly filled out, but running help on them produces the help for the their class instead of help based on __doc__. What I want to do is change it so that running help on them produces customized help that looks essentially like what you would get if they were actu...

get `object.__doc__` as raw string

Is there a way to get object.__doc__ as a raw string, apart from adding an 'r' in-front of the doctring itself in the source code? I have latex code inside and the '\r's, '\f's etc are creating problems. ...

pydoc fails under Windows and Python 2.6.4

When trying to use pydoc under Windows and python.org 2.6.4 I get the following error: C:\>pydoc sys 'import site' failed; use -v for traceback Traceback (most recent call last): File "C:\programs\Python26\Lib\pydoc.py", line 55, in ? import sys, imp, os, re, types, inspect, __builtin__, pkgutil File "C:\programs\Python26\Lib\os...

Reading Python Documentation for 3rd party modules

I recently downloaded IMDbpy module.. When I do, import imdb help(imdb) i dont get the full documentation.. I have to do im = imdb.IMDb() help(im) to see the available methods. I dont like this console interface. Is there any better way of reading the doc. I mean all the doc related to module imdb in one page.. ...

Make Sphinx generate RST class documentation from pydoc

I'm currently migrating all existing (incomplete) documentation to Sphinx. The problem is that the documentation uses Python docstrings (the module is written in C, but it probably does not matter) and the class documentation must be converted into a form usable for Sphinx. There is sphinx.ext.autodoc, but it automatically puts current...

Can pydoc/help() hide the documentation for inherited class methods and attributes?

When declaring a class that inherits from a specific class: class C(dict): added_attribute = 0 the documentation for class C lists all the methods of dict (either through help(C) or pydoc). Is there a way to hide the inherited methods from the automatically generated documentation (the documentation string can refer to the base c...

How to define the "MODULE DOCS" for display with pydoc?

The pydoc documentation of some Python modules (like math and sys) has a "MODULE DOCS" section that contains a useful link to some HTML documentation: Help on module math: NAME math FILE /sw/lib/python2.6/lib-dynload/math.so MODULE DOCS /sw/share/doc/python26/html/math.html How can such a section be included in your own...

Pydoc is not working (Windows XP)

Using Windows XP and Python 2.7 I tried to run "pydoc" through the terminal. unfortunately it doesn't work. Since I'm not allowed to post a screenshot (Newbie). Here is what it says (white on black) "C:\Python27>pydoc raw_input /"pydoc raw_input" is what I typed Der Befehl "pydoc" ist entweder falsch geschrieben oder konnte nicht gefu...

How to get pydoc command working in Windows?

pydoc does not work in Windows. at this post http://stackoverflow.com/questions/3391998/pydoc-is-not-working-windows-xp the last answer by dave webb says to create a pydoc.bat file with this code in it: @python c:\Python27\Lib\pydoc.py %* After I create pydoc.bat where should it be placed so the pydoc command works in the command prom...