Python from C/SDL
bogle at ihug.co.nz
Sat Sep 7 04:36:26 CEST 2002
Gerhard Häring wrote:
> Gib Bogle wrote in comp.lang.python:
> > Hi,
> > I am a complete beginner with Python. My interest in it is focussed
> > on a great piece of open-source software called pymol, a system for
> > visualization of molecules that uses Python and OpenGL. I'd like to
> > get access to pymol's graphical functions from my own program, which
> > is built from C, SDL and OpenGL.
> > I'm wondering if (with a bit of surgery) I'd be able to get access
> > to the lower-level functionality of pymol, by which I mean the file
> > I/O and rendering functions.
> You'll have to embed Python
> (http://www.python.org/doc/current/ext/embedding.html), load the pymol
> modules and call functions or classes in it from C.
> This means you'll have to get familiar with the Python/C API. The good
> thing is that this is relatively easy. You should be able to find
> documentation and examples on embedding Python. If you have any
> particular questions on how to use the Python/C API, just ask here.
Thanks Gerhard. I'll have a look and see if I can grasp it.
More information about the Python-list