[Tkinter-discuss] Re: Okay, this one really has me baffled --KeyboardInterrupt signal not working!

Martin Franklin mart.franklin at gmail.com
Tue Apr 19 15:31:07 CEST 2005

Jared Cohen wrote:
> Well, I tried your suggestion, but no dice. The problem is that the 
> system command I'm calling, immediately forks several other processes 
> which actually do the work; the initial process seems to be just a 
> dummy. But I can't get the PIDs of those child processes, so I can't 
> kill them from inside the program. In fact, the os.kill() method doesn't 
> even seem to work on the initial, dummy process. I don't think this 
> route is going to pan out. Thanks anyway, though.
> However, as I said previously, if I physically go into the terminal 
> window and hit Ctrl-C, the interrupt signal works. What I need is some 
> way to do that from inside my program; that is, to send the interrupt 
> signal directly to the controlling terminal. Any ideas?


You may get more control of the sub-process if you use pexpect
(*nix* only no windows)...


I have not tried to send an interupt signal to a pexpect child but it
may work ;-)


More information about the Tkinter-discuss mailing list