[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] ODE-ctpyes binding



I want an ODE ctypes binding. I dont want to use the Pyrex PyODE.

I've started some work, which you can see here.

http://svn.xerian.net/xerian.net/ode/

I've looked at Alex Holkners works on pygame-ctypes.

Being the lazy programmer I am, I've taken a few shortcuts.

I've written a set of functions which grab the ctypes function pointer
from the dll, add the restype and argtypes attributes, and magically
insert the (possibly) mangled (into a more pep 8 style) name into the
module namespace via globals(). A function needs to be explicitly
dereferenced if it returns a pointer.

I'd like to be more lazy, and parse the .h files for ODE_API
functions, but I havent worked out how to do that yet, other than
using grep and cut + paste ;-)

Before I continue with this approach, I'm looking for some feedback.
Does this style smell bad? Am I going to run into problems using magic
globals() insertion? Does anyone want to help :-)

-Sw.