python thread: KeyboardInterrupt
Recently I have started working on python. I want to know, when I execute my python server at dos environment, if I press 'ctrl+c' the server will be shut-down. But I want to capture that 'ctrl+c' (keyboardInterrupt) and test for user authentication to shut the server at that dos environment. Is it possible in python or not? Does python provide any functionality to capture ctrl+c commands? Thanks.
|





