473,574 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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


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?

Jul 19 '05 #1
3 1283
What about doing it yourself?
import inspect, os
print "<pre>%s</pre>" % inspect.getsour ce(os.makedirs)

<pre>def makedirs(name, mode=0777):
"""makedirs(pat h [, 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

head, tail = path.split(name )
if not tail:
head, tail = path.split(head )
if head and tail and not path.exists(hea d):
makedirs(head, mode)
if tail == curdir: # xxx/newdir/. exists if
xxx/newdir exists
mkdir(name, mode)

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.getsour ce(os.makedirs)

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

da***@dalkescie ntific.com

Jul 19 '05 #4

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

Similar topics

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 like this ease of use and a much cleaner language. But I have reservation about its viability as a dominant web programming language/tools. As...
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 recommend something in the Python world that is comparable. -Flab
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 documentation that is consistent with what MSDN offers and .net-develoepers are used to. I guess I have only searched int he wrong places, or with...
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..
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 has largest community/buzz about it?
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 Ruby on Rails Rolling with Ruby on Rails - Part II Learn to Program with Ruby - by Chris Pine Programming Ruby - Pragmatic Programmer's Guide Ruby...
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 all of you. What do you want in that web framework(Easy use of Database, Easy use of XML, GUI Designer, etc...)? I'm wating your answers. Thank you...
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 surprise, "All Ruby On Rails software has the same directory layout?" That was a revelation to him. He was used to the PHP scene, where diversity is...
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 developing database-backed web applications with Ajax on front-end because it's a great fit for practically any type of web application: collaboration,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.