Re: repeated C-c will cause a window to fail to close

Guido van Rossum (Guido.van.Rossum@cwi.nl)
Thu, 30 Jul 1992 21:50:01 +0200

>Has anyone created a window in the stdwin module of python and not
>been able to get it to close because you sent a series of C-c at
>the Python interpreter?

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)