[Pipet Devel] GtkGLArea gets Python wrapper

J.W. Bizzaro bizzaro at bc.edu
Tue Jul 20 02:05:01 EDT 1999


NNY wrote:
> 
> maybe i missed out on this before... i gather from this that you want
> everything to be written in python?

Hi Greg.  The confusion comes from the fact that Loci's design has been changing
so much, as has been the role of Python.  At one point I might have said we
should strive for 100% Python, and use C only if we really have to.  But
recently some of us, particularly Justin, Humberto and Alan, have put the CORBA
(and other object models) option back on the table.  The greatest advantage of
using these models is perhaps language-independence.  So, Python will not always
be REQUIRED for Loci development.

Where does Python stand in the big picture now?  Well, it will always play a
major role doing what it does extremely well: acting as a glue and scripting
language for Loci.  We plan to make the major GUI components, such as the
Workspace, in Python-GTK.  BUT, CORBA et al will allow us to make non-Python
plug-ins/widgets/loci.

Depending on the uniqueness of the widget/locus, use of Python will be more or
less a part of making one.  For example, if a widget/locus outputs to a
GtkGLArea canvas, the widget/locus can call it via CORBA, and it probably won't
need any Python wrappers.  But if the widget/locus needs a custom drawing area,
we'll have to use Python to put it in the Workspace.

> if whatever you want me to do is to be
> written in python, where can i find more info on python programming?

You'll find some links about learning Python-Gtk/Gnome at the PyG Tools page:

    http://bioinformatics.org/pygtools/

You can also check out the Python page:

    http://www.python.org/

A REALLY good book, if you want to go that route, is

    Learning Python
    Mark Lutz and David Ascher
    O'Reilly, 1999
    ISBN 1-56592-464-9

But what was I hoping you could do for Loci?  After all, I asked you to help;
you didn't volunteer.  We need a molecule modeling widget/locus for starters: a
plug-in that can render 3D, OpenGL molecules.  Fortunately, we have two
complementary projects to base this on.  Rob Harrison has much of the C code to
display molecules.  His program is AMMP (Another Molecular Modeling Program):

    http://asterix.jci.tju.edu/ammp.html

And of course you have your mg^2 modeler and experience with OpenGL.  I think we
can combine much of what we have into a widget/locus without a lot of new code. 
Will this require Python?  I think we can either use the Python-GtkGLArea
wrapper or make it all in C and then write our own wrapper.  But if we make a
Python-based widget/locus, we'll have more reuse.


Cheers.
Jeff


> 
> -greg
> 
> http://www.op.net/~finklesk/index.html
> 
> "The problem is not that the world is full of fools. The problem is that
> lightning isn't being distributed right." - Mark Twain
> 
> On Mon, 19 Jul 1999, J.W. Bizzaro wrote:
> 
> > Locians,
> >
> > Very good news:
> >
> > James Henstridge writes:
> >
> > > In other news, I have added a wrapper for gtkglarea to pygtk.  There are a
> > > few examples in the examples/gl directory, including a translation of the
> > > mesa gears demo.  To use it, you will also need the PyOpenGL package.
> >
> > GtkGLArea is the Gtk drawing area/widget for OpenGL:
> >
> >     http://www.student.oulu.fi/~jlof/gtkglarea/
> >
> > I wrote to James about making a Python wrapper for it, and well, he just did.
> > The bottom line for us is that we can make Python-based widgets for Loci to
> > render 3D models.  Very cool.  This brings us another step closer to integrating
> > AMMP and MMTk.
> >
> >
> > Cheers.
> > Jeff

-- 
                   +------------------------------------+
                   |                                    |
                   |           J.W. Bizzaro             |
                   |      jeff at bioinformatics.org       |
                   |                                    |
                   |       THE OPEN COLLABORATORY       |
                   |    FOR MOLECULAR BIOINFORMATICS    |
                   |                                    |
                   |     http://bioinformatics.org/     |
                   |                                    |
                   +------------------------------------+




More information about the Pipet-Devel mailing list