Under windows i use the function GenerateConsoleEtrlEvent(CTRL_C_EVENT,pid) but this terminated the python process ! Shouldn't it only generate a "KeyboardInterrupt" exception ? CTRL_BREAK_EVENT also terminates the process.