Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Converting c header file to a python file

5 views
Skip to first unread message

Gabriel Genellina

unread,
Dec 11, 2008, 8:39:28 PM12/11/08
to pytho...@python.org
En Thu, 11 Dec 2008 10:28:21 -0200, tarun <tarund...@gmail.com>
escribió:

> I am looking for a tool/utility by which can convert c header file to a
> python file. A typical header file that I want convert looks like:

Locate h2py.py somewhere in your Python distribution. From the comments:

# Read #define's and translate to Python code.
# Handle #include statements.
# Handle #define macros with one argument.
# Anything that isn't recognized or doesn't translate into valid
# Python is ignored.

(doesn't convert *all* you want, but it's a start)

--
Gabriel Genellina

0 new messages