Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

javadoc equivalent for python?

2,009 views
Skip to first unread message

David White

unread,
Jul 27, 2000, 3:00:00 AM7/27/00
to
Hi all,

Is there an equivalent python application to javadoc?

thanks,
david

David Allen

unread,
Jul 27, 2000, 3:00:00 AM7/27/00
to
In article <3980AA2F...@seas.upenn.edu>, David White
<dwh...@seas.upenn.edu> wrote:

If you search for something like "source code documentation" on
freshmeat.net, you'll find about 4 different multi-lingual packages for
this type of stuff.

I don't know if any of them specifically support python because of the
whole '#' commenting stuff, (most like the /* comment */ syntax) but it's
worth looking over there, since it's likely some perl monkey has written
something like that for perl code. :)
--
David Allen
http://opop.nols.com/
----------------------------------------
Yogi Berra, upon hearing his wife say she had been to see
"Doctor Zhivago," said, "What's the matter with you _now_?"

richard_chamberlain

unread,
Jul 28, 2000, 3:00:00 AM7/28/00
to
David,

A couple of things spring to mind:

There is PythonDoc - which I've not used but you can get it at:

http://starship.python.net/crew/danilo/pythondoc/

Also Ka-Ping Yee's inspect.py and htmldoc are very good:

http://www.lfw.org/python/

These produce documentation based on docstrings and comments (#).

Paul Prescod recently asked me to write a raw text ouput using inspect.py
which you can have if you let me know.

Richard

David White <dwh...@seas.upenn.edu> wrote in message
news:3980AA2F...@seas.upenn.edu...

Andrew Dalke

unread,
Jul 28, 2000, 3:00:00 AM7/28/00
to
Some commentary, since I've been looking into this question
recently.

richard_chamberlain wrote:
>There is PythonDoc - which I've not used but you can get it at:
>http://starship.python.net/crew/danilo/pythondoc/

As a caution, I've found it hard to understand what the code is
doing. There seems to be too much code for what it does. For
example, it's several times larger than Ka-Ping's htmldoc.
There are inconsistancies in several places, like sorting (in
some places, name are sorted case-insensitive and others
case-sensitive.) There even appear to be a few bugs, like in
the indicies.html where if you have more than 3 levels in your
hierarchy, it uses the CSS class "indent4" but pythondoc.css
doesn't define that class.

>Also Ka-Ping Yee's inspect.py and htmldoc are very good:
>http://www.lfw.org/python/

I like the code better. It's easier to understand and the output
looks prettier. Its biggest failing is that it doesn't understand
packages, so submodules are not documented. It also doesn't
distinguish between what I call a name and an alias

def f():
pass
g=f

It uses

def document_function(object, ...):
...
anchor = clname + "-" + object.__name__

But the __name__ of g is "f", so the generated output is wrong.

I ended up writing a new system for my client to do what they needed,
because neither of these two were good enough. Not sure if they'll
release the final code, though :(

Andrew
da...@acm.org


0 new messages