Le lundi 03 octobre 2005 à 14:58 -0400, Germán Poó Caamaño a écrit :
> Le lundi 03 octobre 2005 à 09:41 -0700, Rich Burridge a écrit :
> > Johan Dahlin wrote:
> > 
> > > This is found as gtk.glade
> > 
> > Thanks (and to Germán who also mentioned it).
> > 
> > > 
> > >>   "import pygtk"                  External
> > > 
> > > 
> > > You also have: gtk.keysyms, gtk.gdk and gtk.compat (for some 
> > > compatilibity with ancient versions)
> > > 
> > > Not needed, only a wrapper for handling multiple installed versions.
> > > 
> > > Note that some parts of the documentation still needs to be written,
> > > atk is completely missing for instance.
> > 
> > Okay.
> > 
> > >> What I don't seem to be able to find is the equivalent for PyORBIT
> > >> or gnome-python. I've just downloaded the source tarball at:
> > > 
> > > 
> > > There's as far as I know no documentation for gnome-python or pyorbit.
> > > 
> > > The easiest way to get a list of APIs is to write a script which goes
> > > through all the modules and introspects them (using 
> > > dir/getattr/isinstance).
> > 
> > Thanks. Germán can up with something else that I think will work nicely:
> > 
> >  > In python is possible to try:
> >  >
> >  > >>>import gconf
> >  > >>>help(gconf)
> > 
> > I will also be able to do this for the PyGtk doc and bring it all
> > into files in the architecture project case directory (thereby making
> > a snapshot of the actual documentation).
> 
> Answering here what you asked to me in another mail:
> 
> > 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)

-- 
Germán Poó Caamaño
http://www.ubiobio.cl/~gpoo/

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to