hi thanks for the reply.Actually, i should clarify what i am doing. the program's output will be displayed to a web browser using cgi, so there is no keyboard interrupt. The backend cgi script (python script) will have to send Ctrl-C to break the program. thanks