[Zope] Python Scripts

Peter Bengtsson mail@peterbe.com
Thu, 31 May 2001 09:14:01 +0200


> > > if _['coffeebreak']:
> > >   print 'coffee'
> >
> > The purpose of the Script bit is to check for the presence of an object
OR
> > property, isn't it?
>
> Sorry, you've lost me...

<copy original>
> > How can we in the python script check if the a certain variable exists
in
> > the namespace?

<myresponse>
use
if hasattr(context,'variable'):

<restoftheconfusion>
I'm lost too
> Chris
>