Hanlie Pretorius, 01.03.2011 13:33:
Can anyone perhaps suggest the easiest way of translating the C code
into Python, bearing in mind that I'm rather a beginner?

A beginner of what? Python? Programming in general?

The C code you posted doesn't look too complex, so you could try to translate it (mostly literally) into Python syntax and use Cython to wrap that in a binary extension.

Cython is basically Python, but it allows you to call directly into C code. Here's a tutorial:

http://docs.cython.org/src/tutorial/clibraries.html

Stefan

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to