Global "except" condition

Ernesto erniedude at gmail.com
Mon Jul 10 18:55:25 EDT 2006


Within the scope of one Python file (say myFile.py), I'd like to print
a message on ANY exception that occurs in THAT file, dependent on a
condition.

Here's the pseudocode:

if anyExceptionOccurs():
      if myCondition:
            print "Here's my global exception message"


Is this functionality possible in python?  If so, how?




More information about the Python-list mailing list