Code documentation tool similar to what Ruby (on Rails?) uses

K

Ksenia Marasanova

Hi,

I wonder if there is a tool for generation Python API documentation
that can include source code into HTML output. Example:
http://api.rubyonrails.com/ I really like the possibility to click on
"show source" link and read the source of the method!

AFAIK it is not possible with Epydoc and Pydoc.. but maybe other tools?

Thanks!
 
M

Michele Simionato

What about doing it yourself?
<pre>def makedirs(name, mode=0777):
"""makedirs(path [, mode=0777])

Super-mkdir; create a leaf directory and all intermediate ones.
Works like mkdir, except that any intermediate path segment (not
just the rightmost) will be created if it does not exist. This is
recursive.

"""
head, tail = path.split(name)
if not tail:
head, tail = path.split(head)
if head and tail and not path.exists(head):
makedirs(head, mode)
if tail == curdir: # xxx/newdir/. exists if
xxx/newdir exists
return
mkdir(name, mode)
</pre>

Michele Simionato
 
K

Ksenia Marasanova

12 Jun 2005 08:12:14 -0700 said:
What about doing it yourself?

That's easy, thanks! I guess I'll submit a patch for Epydoc with the
functionality I've mentioned :)
 
A

Andrew Dalke

Ksenia Marasanova responsded to Michele Simionato
That's easy, thanks! I guess I'll submit a patch for Epydoc with the
functionality I've mentioned :)

Before doing that, add a "cgi.escape()" to the text. Otherwise
embedded [<>&] characters will be interpreted as HTML.

Andrew
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top