In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Tony Nelson wrote: > > I'm trying to find out what is eating some KeyboardInterrupt exceptions > > in a fairly large program (yum). My KeyboardInterrupt handler is called > > for some Ctl-C presses, but for others nothing seems to happen. > > > ... I'd like to use a debugger to trace > > KeyboardInterrupt exceptions, make sure that they're happening, and see > > what is handling them. > > I don't know how to do that in Idle. You can replace the default > Ctrl-C interrupt handler with your own and use that to inspect the > current stack.
Thanky you, that helps. Interestingly, some Ctl-Cs don't get caught. Presumably they're happening in a subprocess. Now to see if I can get into that situation again where Ctl-C is ignored. I need to know what's eating the exceptions. I don't think it's a subprocess in the case I'm concerned with. I don't think yum is threaded, but apparantly importing the tread module anywhere should keep KeyboardInterrupt on the main thread anyway (?). It would be nice if I could inspect the stack and find the exception handlers. I'm using trace handlers, but their output seems somewhat spotty and inconsistent, or maybe just confusing. ________________________________________________________________________ TonyN.:' [EMAIL PROTECTED] ' <http://www.georgeanelson.com/> -- http://mail.python.org/mailman/listinfo/python-list