Catching error text like that shown in console?

Peter A. Schott paschott at no.yahoo.spamm.com
Fri Dec 9 14:04:10 EST 2005


I know there's got to be an easy way to do this - I want a way to catch the
error text that would normally be shown in an interactive session and put that
value into a string I can use later.  I've tried just using a catch statement
and trying to convert the output to string, but this doesn't always work.  I
really don't have programs complex enough to do a lot of specific catching at
this point - I just want to know:
  1. something failed
  2. here's the error output/traceback

Anyone know how I can do this or if it's possible?  Didn't find anything doing a
search so I figured I'd hit up the experts.

Thanks.

-Pete Schott



More information about the Python-list mailing list