[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] ODE-ctpyes binding
- To: pygame-users@xxxxxxxx
- Subject: [pygame] ODE-ctpyes binding
- From: "Simon Wittber" <simonwittber@xxxxxxxxx>
- Date: Wed, 12 Jul 2006 16:43:19 +0800
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Wed, 12 Jul 2006 04:43:29 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=CDWWeYcT+bulyLgsJEOvBFsdLtBW1tUjGQ5SrdtSY+weytAUBWjauDv6mBgm5SlthODFC+FJRjS/rS+hjeCzo0xinIVl/EdmrQo1M43CT2wpsb1IQkJL1tZ7F5vh9RHexmlnVUz/BSfIC3UhoJENWoa2F1cBMbxFwEhbD8kdmPQ=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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.