Germán Poó Caamaño wrote:>>
>>>Actually, this is perfect.  My Python skills are limited, so
>>>can you tell me is there an easy way to get it to do 
>>>"help(<module > name>)" and redirect the output to a file?
> 
> 
> Oops.  I didn't notice that you wanted one file per module.
> 
> The trick should be something like:
> 
> #!/usr/bin/env python
> 
> import sys
> 
> modules = [ 'gconf', 'gnome', 'gnome.ui', 'gnome.ui', 'gnomevfs',
>             'bonobo', 'bonobo.ui', 'bonobo.activation' ]
> 
> for i in modules:
>       sys.stdout = output(i + ".txt", "w")
>       j = __import__(i, globals(), locals(), [i])
>       help(j)
> 

You can also utilize the shell and pydoc, no need for a script, here's a
bash one liner (the following should be on the same line, in case mail
clients break it to 2):

for i in gconf gnome gnome.ui gnome.ui gnomevfs bonobo bonobo.ui
bonobo.activation; do pydoc $i > $i.txt; done

Cheers
--
Meir Kriheli
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to