[Zope-dev] Python Scripts Bug & Question

Chris Withers chrisw@nipltd.com
Tue, 20 Feb 2001 13:43:33 +0000


Evan Simpson wrote:
> 
> From: Chris Withers <chrisw@nipltd.com>
> > The Bug:
> >
> > If I use an name other than 'context' to bind to context, I quite often
> (but not
> > always :-S) get a KeyError on that name.
> 
> I'll check this out.  It's in the Collector, right?

It is now ;-)

http://classic.zope.org:8080/Collector/1982/view

> > The Question:
> >
> > If I'm calling a Python Script from a Python Product (for example), how
> would I
> > pass a namespace to the script that would get bound as the namespace
> argument?
> 
> Treat it as a keyword argument.  "Caller's namespace" is the only one of the
> binding names that behaves this way, since the caller has complete control
> over the contents of the namespace anyway.  For example:
> 
> myps(_=ns)

Cool :-) And even though I pass it in as _, it'll get bound to whatever is
specified on the bindings tab, right?

Thanks for the quick reply,

Chris