||Understanding Network I/O, Part 2|
|Subject:||Mixing C and Python.|
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.