header files (was Re: fcntl example)

Marc Wachowitz (mw@ipx2.rz.uni-mannheim.de)
3 May 1994 15:10:51 GMT

Guido.van.Rossum@cwi.nl wrote:
> I just noticed something.

> > import fcntlh # values used by fcntl. created using h2py from
> > # /usr/include/sys/fcntl.h

> Actually, such a file is already present in the Python distribution in
> Lib/sgi and Lib/sun4, named FCNTL.py. Versions for other platforms
> are most welcome!

It might be a good idea to generate Python modules with the symbolic names
(and their values, of course) from header files used for functions such as
posix.open etc., and the errno values. Since the symbols will usually work
across various Unix variants (and many also on MSDOS), that would simplify
work and increase portability.

Is something similar already planned? Otherwise I might be able to build a
tool for that purpose, building on h2py - but it should also perform error
checking, handle nested includes like from <errno.h> to <sys/errno.h> etc.
(But don't expect it within a few days ;-)

* wonder everyday * nothing in particular * all is special *
Marc Wachowitz <mw@ipx2.rz.uni-mannheim.de>