[python-win32] Control-C
Gabriel Genellina
gagenellina at softlab.com.ar
Thu Oct 13 22:12:09 CEST 2005
At Thursday 13/10/2005 17:33, you wrote:
I've looked around, but I wasn't able to find anything about this
>issue. I am writing an application that calls a separate windows
>application as a process. That's not a problem, I can get it to run and
>do what it needs to do. However, the normal way to stop the separate
>windows application is to hit CTRL-C. That allows it to end and do
>finishing processes. Is there a way to send a CTRL-C signal to a
>process? I tried simply doing a TerminateProcess on the process, as
>suggested to me earlier, however, this doesn't allow the normal cleanup
>operations to do what they need to do. Any help you might have would be
>greatly appreciated.
win32api.GenerateConsoleCtrlEvent
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/generateconsolectrlevent.asp
Gabriel Genellina
Softlab SRL
More information about the Python-win32
mailing list