[Zope] Equivalent to exc_info in python script

Jim Gallacher jgallach@albedo.net
Thu, 25 Jul 2002 00:56:05 -0400


Dieter,

Thanks for the tip. Just what I needed.

(Jim says to himself ... read the source ... read the source ... read the source)

Jim

On Tue, 23 Jul 2002 23:28:13 +0200
Dieter Maurer <dieter@handshake.de> wrote:

> Jim Gallacher writes:
>  > I'd like to use examine the error type and value when an exception
>  > is thrown in a python script, equivalent to:
>  > 
>  > err_type = sys.exc_info()[0]
>  > err_value = sys.exc_info()[1]
>  > 
>  > But sys.exc_info can't be accessed from a script.
>  > 
>  > I'm sure there must be an easy way to get at the error value and
>  > type, but I can't find it.
>  > 
>  > Can anyone help?
> You may want to read the "README" file for PythonScripts
> (either in the source directory or in the README tab of the product).
> 
> 
> Dieter
>