Re: Beginners question: generating ctypes out of header files
Chuck Esterbrook <ChuckEsterbrook <at> yahoo.com>
2003-06-05 02:08:29 GMT
On Tuesday 03 June 2003 08:30 am, Andrew Smart wrote:
> Hi,
>
> I have a typical "beginners" question:
> is there a tool out to generate ctypes/Python code out of the content
> of a C/C++ header file?
>
> I found only stuff for COM in the examples. May I be blind?
>
> Andrew
Hey, I'm looking for one two! I'd like to use it on things like
WINUSER.H.
I was contemplating hijaacking portions of SWIG which already has a C
preprocessor and C parser (implemented in C). Perhaps those parts can
be SWIGed or invoked from ctypes so that we can use them from Python.
But then maybe we could just use SWIG anyway? I haven't tried it yet on
a WIN32 API header, but I suspect there must be a monkey wrech
somewhere, or win32all would already be wrapping everything...
--
--
Chuck
http://ChuckEsterbrook.com
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
(Continue reading)