How does ^C work in Python?

Hal Murray hmurray at
Tue Sep 27 08:12:27 UTC 2016

dfoxfranke at said:
> In Python, there's a minimal generic interrupt handler which calls
> Py_AddPendingCall() to schedule a call to a more complete handler. The main
> interpreter loop then calls Py_MakePendingCalls() every few iterations or on
> return from any system call.

Thanks.  I assume "system call" includes library calls as well as kernel 

So DNS lookups are non-interruptable, just like in c.

These are my opinions.  I hate spam.

More information about the devel mailing list