There's a problem with Python's STDWIN interface and C-c that might
explain your problem. When the Python code calls stdwin.getevent(),
interrupt signals sent to the Python interpreter are postponed until
this function returns an event, and then not always handled
adequately. Unfortunately, it would require a significant redesign of
the underlying STDWIN library and interface to fix this (simply
long-jumping out of the underlying wgetevent() call might leave the
internal administration of STDWIN or of the under-under-lying X11 or
Mac window system in a bad state).
I suggest that you redesign your code to avoid using signals (that's
better anyway, for various reasons), e.g. the Emacs code could always
send a line of input to the Python process when it is finished, and
the Python interface could wait for this line.
--Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
"May your mailbox overflow with messages" (modern Chinese curse)