Calling C from Python

Rich Somerfield rich_somerfield at
Mon Feb 19 11:33:43 CET 2001

I have written a Game Engine in Python (main allow simulation of Board Games
using a config file as the definition of the game). The problem is, is that
the AI section is too slow.  As the code needs to be generic (e.g. cant
specialise as the game type etc... is unknown until runtime - from config
file), i have been unable to optimise the code further.

I want to use Python as my main langauge and have certain code (where
performance is essential) written in C.  I have looked at the doc's and cant
get a feel for it.  Can anyone point me in the direction of some sample code
(complete - not segments!), or give me a little helping hand?


More information about the Python-list mailing list