Re: How to except the unexpected?

2006-03-03 Thread Steven D'Aprano
On Fri, 03 Mar 2006 21:10:22 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> try: >> process_things() >> except ExpectedErrors: >> recover_from_error_gracefully() >> except ErrorsThatCantHappen: >> print "Congratulations! You have found a program bug!" >>

Re: Win32api, pyHook, possibly win32com, not sure XD, thats why I'm posting

2006-03-03 Thread Michel Claveau
Hi! Rename Pythonw.exe like jtp.exe And... run: jtp.exe yourscript.pyw -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: idea: add an asynchronous exception class

2006-03-03 Thread Steven D'Aprano
On Fri, 03 Mar 2006 22:31:49 -0800, Paul Rubin wrote: > I'd like to suggest adding a builtin abstract class to Python called > AsynchronousException, which would be a subclass of Exception. [snip rationale] +1 on this. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: add an asynchronous exception class

2006-03-03 Thread Fredrik Lundh
Paul Rubin wrote: > I'd like to suggest adding a builtin abstract class to Python called > AsynchronousException, which would be a subclass of Exception. The > only asynchronous exception I can think of right now is > KeyboardInterrupt, so KeyboardInterrupt would become a subclass of > Asynchrono

Re: How to except the unexpected?

2006-03-03 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > The way to deal with it is to add another except clause to deal with the > KeyboardInterrupt, or to have recover_from_error_gracefully() deal with > it. I think adding another except clause for KeyboardInterrupt isn't good because maybe in Python 2.6

<    1   2   3