Understanding Network I/O, Part 2
Subject:   Mixing C and Python.
Date:   2004-02-14 01:00:29
From:   spiv
Response to: Mixing C and Python.

I'd use Twisted for the main loop, definitely. You can drop the GIL in your C code using the Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS macros -- see the Python C API docs for details.

See also for a rant about why you should extend, not embed :)