create documentation with the comments present in the source code

Martin Franklin martin.franklin at westgeo.com
Fri Sep 14 04:43:50 EDT 2001


Dietmar Lang wrote:

> Hi!
> 
>> As it is possible to put comment in 'python' code just after a function,
>> a class as following :
>> 
>> def Function():
>>     """
>>     My comment
>>     """
>>     if ...
>> 
>> As it is possible to get this comment in the python command with an
>> simple instruction...
> 
> Yes, here's a little interactive session:
> 
>>>> def Voila():
> """This is documentation for Voila()"""
> pass
> 
>>>> print Voila.__doc__
> This is documentation for Voila()
>>>> 
> 
> There you go... If more details are needed, maybe someone here will jump
> in...
> 
>> Is there an utility which realize a pretty documentation with these
>> comments ?
> 
> There propably is, else why don't you make one? ;)
> 
> Kudos, Dietmar
> 

Take a look at HappyDoc this will create static HTML documentation from  
doc strings search the vaults http://www.vex.net/parnassus/








More information about the Python-list mailing list