[Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Chris Withers
Hi, Got a bug and an old unanswered question: 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. The Question: If I'm calling a Python Script from a Python Product (for example), how would I pass a namespace to

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] 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? The Question: If I'm calling a Python Script from a Python Product

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Chris Withers
Evan Simpson wrote: From: Chris Withers [EMAIL PROTECTED] 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 ;-)

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Chris Withers
Evan Simpson wrote: From: Chris Withers [EMAIL PROTECTED] Cool :-) And even though I pass it in as _, it'll get bound to whatever is specified on the bindings tab, right? Nope. If you called it "fred" on the bindings tab, pass it as "fred". rats :-( How hard would it be to make it

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Cool :-) And even though I pass it in as _, it'll get bound to whatever is specified on the bindings tab, right? Nope. If you called it "fred" on the bindings tab, pass it as "fred". Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I'm calling a python script with the context bound to, lets say, 'fred'. I call the python script like this: result = self.aq_acquire(variable_containing_name_of_PS)(a_dictionary) ...where self is an instance of my python product, and a_dictionary, is,

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Chris Withers
Evan Simpson wrote: "aimed at"? This will pass the dictionary as a single positional parameter. It won't do anything with bound names or keyword parameters. Cool, that's what I meant... I just wondered if the way I was calling it might have had something to do with cotnext not being bound