Ernesto wrote:
> 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?
> 
What if your module defines a function, and then that function is called 
from some other module and raises an exception. Would you then want the 
global exception message to appear?

If so then I'm not sure that what you want is possible.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to