[Zope] context in Python Script

Chris Gray cpgray@library.uwaterloo.ca
Tue, 28 Nov 2000 14:04:34 -0500 (EST)


D'oh!

Thanks, Michel.  That was the problem.  Right now bindings all default to
blank in a new external script.

Cheers,
Chris


On Tue, 28 Nov 2000, Michel Pelletier wrote:

> Chris Gray wrote:
> > 
> > I still can't get external Python Scripts to work as described in the Zope
> > Book.  I am using the version of Python Scripts from the public
> > CVS.  Internal Scripts work fine, but I can't seem to use the
> > "context" object in an external script.
> > 
> > def tryContext():
> >     """tryContext function"""
> >     return context.objectIds()
> > 
> > gives a NameError on context.
> 
> Look at your 'Bindings' tab.  The 'context' binding should be
> 'context'.  If it's something else (like 'self') then change it.
> 
> Basicly, 'container' should be 'self' and 'context' should be 'context'.
> 
> -Michel
>