Tony Nelson schrieb: > Hmm, OK, darn, thanks. MSWindows does allow users to press Ctl-C to send a > KeyboardInterrupt, so it's just too bad if I can't find a way to test it > from a script.
You can use GenerateConsoleCtrlEvent to send Ctrl-C to all processes that share the console of the calling process. > BTW, I picked SIGALRM because I could do it all with one thread. Reading > POSIX, ISTM that if I sent the signal from another thread, it would bounce > off that thread to the main thread during the call to kill(), at which > point I got the willies. OTOH, if kill() is more widely available than > alarm(), I'll give it a try, but going by the docs, I'd say it isn't. Indeed, alarm should be available on any POSIX system. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com