[python-win32] Re: WIN32 API?

Thomas Heller theller at python.net
Tue Jun 10 17:55:44 EDT 2003


Chuck Esterbrook <ChuckEsterbrook at yahoo.com> writes:

> > > > Niki spahiev mentioned Simon Burton's cdecl.py module in the
> > > > ctypes-users mailing list. I did some experiments with is and the
> > > > results are quite promising.
> > > >
> > > > I sent VC98's windows.h file through the cl preprocessor (which
> > > > resulted in a 46000 line file after removing chunks of empty
> > > > lines, and fed it to the cdecl module.
> > > >
> > > > I had to fix one bug with hex constants, and had to hack around
> > > > several windows specific problems (__cdecl, __stdcall, and other
> > > > MS qualifiers), and unnamed structures. cdecl does not yet parse
> > > > the file completely, but it looks promising. Maybe the end result
> > > > can be something like Python's h2py script.
> >
> > Currently I'm investigating David Beazley's PLY module for this
> > purpose which is fantastic. A lex-yacc combination written in pure
> > python!
> 
> Yeah I peeked at that too. But if your cdecl.py fixes already work, 
> might you share them with the rest of us?

These were hacks, not fixes. You can easily do it yourself, and
unfortunately I don't have the patched cdecl.py anymore ;-(. Just throw
the preprocessed files to it, and see what happens.

Thomas




More information about the Python-win32 mailing list