[Zope] Another Python Script Question

Tim Zegir trzegir at ncable.net.au
Thu Dec 4 20:42:31 EST 2003


Yes it works.... sort of
I now get this error

Error Type: NameError
Error Value: global name 'error' is not defined

So I guess error is not the right object to use??


-----Original Message-----
From: James Davies [mailto:jamesd at mena.org.au] 
Sent: Friday, 5 December 2003 12:12 PM
To: Tim Zegir; zope at zope.org
Subject: Re: [Zope] Another Python Script Question

for item in object:
	try:
		context.somescript()
	except:
		print error
return printed
	

On Fri, 5 Dec 2003 10:51 am, Tim Zegir wrote:
> How would I go about using a statement like 'on-error' in a python
> script?
> Eg.
> For item in object:
>             context.somescript
>             on-error:
>                         print error
>                         skip
> return printed
>
> Thanks
> Tim Zegir







More information about the Zope mailing list