473,473 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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!
--
Ksenia
Jul 19 '05 #1
3 1267
What about doing it yourself?
import inspect, os
print "<pre>%s</pre>" % inspect.getsource(os.makedirs)

<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

Jul 19 '05 #2
12 Jun 2005 08:12:14 -0700, Michele Simionato <mi***************@gmail.com>:
What about doing it yourself?
import inspect, os
print "<pre>%s</pre>" % inspect.getsource(os.makedirs)


That's easy, thanks! I guess I'll submit a patch for Epydoc with the
functionality I've mentioned :)
--
Ksenia
Jul 19 '05 #3
Ksenia Marasanova responsded to Michele Simionato
>>> print "<pre>%s</pre>" % inspect.getsource(os.makedirs)


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
da***@dalkescientific.com

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Useko Netsumi | last post by:
or perhaps Java for developing web application? I've develop a few applications using PHP/MySQL/Apache and its growing in size. After reading the Ruby tutorial, and do a simple script, I kind of...
23
by: flab ba | last post by:
The pragmatic programmers (Dave & Andy) are spreading a good word about RubyOnRails. I was wondering if there are any Python programmers who are /also/ familiar with Rails - and if they could...
12
by: Fredrik Olsson | last post by:
Hello. For Java there is javadac, for Obj-C headerdoc2html, for C doxygen, and even for good old VB 6 there is VBDox. But I have found no suitable tool for documenting my .net code to get...
5
by: Matias | last post by:
I'm not asking if it's better or not than php... I want to know the opinions of web developers about this new toy... Byee..
122
by: seberino | last post by:
I'm interested in knowing which Python web framework is most like Ruby on Rails. I've heard of Subway and Django. Are there other Rails clones in Python land I don't know about? Which one...
9
Niheel
by: Niheel | last post by:
I've used the following tutorials to help be get a better understanding of Ruby On Rails or ROR. Installing Ruby on Rails - Fedora / Lighthttpd Tutorial & Setup for Ruby on Rails Rolling with...
34
by: emrahayanoglu | last post by:
Hello Everyone, Now, I'm working on a new web framework. I tried many test on the other programming languages. Then i decided to use python on my web framework project. Now i want to listen...
10
by: lawrence k | last post by:
I work mostly in PHP, but at the web design firm where I work we are thinking of switching to Ruby on Rails. Our lead designer recently installed Typo on a client's site and he said to us, with...
1
by: LinkExchange.AB | last post by:
iTechArt has specialized in Ruby on Rails (ROR) development and provides a complete software outsourcing services for web development solutions based on Ruby. We suggest use Ruby framework for...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.