win32console.GenerateConsoleCtrlEvent
GenerateConsoleCtrlEvent(CtrlEvent, ProcessGroupId)
Sends a control signal to a group of processes attached to a common
console
Parameters
CtrlEvent : int
Signal to be sent to specified process group - CTRL_C_EVENT or
CTRL_BREAK_EVENTProcessGroupId=0 : int
Pid of a process group, use 0 for calling process