Using pydoc

Fernando Perez fperez528 at
Mon Feb 11 00:35:39 EST 2002

> Calls seem to be made like:
>         drvobj = partition.Partition(drv)
>         drvobj.create_partition_table()
>         drvobj.commit_changes()
> My question is:  How do I find documentation for those things?
>     ~$ pydoc partition.Partition
>         no Python documentation found for 'partition.Partition'

<blatant plug for my pet project follows>

In [1]: import os

In [2]: os.path?
Type:           module
Base Class:     <type 'module'>
String Form:    <module 'ntpath' from 'C:\Program
Namespace:      Currently not defined in user session.
File:           c:\program files\python22\lib\
    Common pathname manipulations, WindowsNT/95 version.

    Instead of importing this module directly, import os and refer to this
    module as os.path.

The above is a copy/paste of an IPython session. It's actually a Linux
project originally, but right now I happen to be cleaning up a Windows port.
With object? IPython will give you all sorts of details about any object it
can access (uses pydoc internally).

You can get it at

</blatant plug>



More information about the Python-list mailing list