Understanding Python Documentation

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Thu Nov 24 16:54:48 CET 2005


Josh Cronemeyer wrote:
> On Thursday 24 November 2005 09:27 am, Simon Brunning wrote:
> 
>>On 24/11/05, Josh Cronemeyer <joshuacronemeyer at sunflower.com> wrote:
>>
>>>I have very little experience programming in python but considerable
>>>experience with java.  One thing that is frustrating me is the
>>>differences in the documentation style.  Javadocs, at the top level are
>>>just a list of packages.  Drilling down on a package reveals a list of
>>>classes in that package, and drilling down on a class reveals a list of
>>>methods for that class.  Is there something similar for python?
>>>
>>>The closest thing I have found to this for python is
>>>http://www.python.org/doc/2.4.2/modindex.html  which really isn't the
>>>same thing at all.
>>
>>I think it is, really. Thing is, Python's standard library is broader
>>and less nested in structure than Java's, so it stands to reason that
>>its documetation will be broader and less nested in structure too.
>>
>>--
>>Cheers,
>>Simon B,
>>simon at brunningonline.net,
>>http://www.brunningonline.net/simon/blog/
> 
> 
> It is true about the nature of Python's standard library.  But when dealing 
> with a large set of methods, for example, the OS module, it is nice to have 
> the javadoc API style documentation.  You can see a quick summary of what is 


But you can :)  On windows the option is called  "Module docs"
this starts a local http server that you can point your browser at
(indeed just click the Open browser button) and you will see the python
standard library API (pydoc)

On linux / UNIX the pydoc command line accepts a flag (not sure what it
is) but with the flag (-g I seem to remember) will do the same as a the
windows thing) the added benifit of pydoc is that you can 'run' it on
your own code and see the resulting API description too!


Cheers
Martin



> available, then if you want more detail you drill down on that particular 
> method.  Oh well.  I'll get used to it :)
> 
> Thanks!
> Josh






More information about the Python-list mailing list