Terry Reedy wrote:
> "P Boy" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>>> Has anyone yet written a program to grab C struct declaration from the 
>>> .h
>>> to produce code like
>>>
>>> # Overlay configuration
>>> class OverlayStoreConfig(ctypes.Structure):
>>>     _fields_ = [('FormatVersion',   ctypes.c_ulong),
>>>                 ('VolumeSize',      ctypes.c_longlong),
> etc
>> http://starship.python.net/crew/theller/ctypes/codegen.html says it can
>> be done. However, it requires MSVC 7.1 and I have not yet install it
>> since I already have MSVC (6,7,8) on my PC.
> 
> Or vc6.  Neither of which most people have, especially those not using Swig 
> because they don't do C.  Ok, we need program entirely in Python.  Possible 
> exercise for someone.
> 

Alan Green apparently has got it to work with the free vctoolkit:

http://cardboard.nu/blog/2005_07_14/ctypes_code_generator_for_chea.html


Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to