Re: [Zope] Picking up a parameter in a ZPT
On 6/17/05, John Poltorak <[EMAIL PROTECTED]> wrote: > On Fri, Jun 17, 2005 at 04:33:28PM +0100, Peter Bengtsson wrote: > > Try > > python:here.parse_file(file=options['parm'],sepr=',',clone=1)"> > > Thanks for the suggestion, but I need to get the 'context' keyword in > there. > No. "context" is different from "options". context is the Zope namespace and options is a namespace that holds which parameters the template was called with. > I tried this > > python:here.parse_file(file=context.options['parm'],sepr=',',clone=1)"> > > but ended up with > > Error Type: AttributeError > Error Value: options > > Don't seem to be able to get the right syntax... > > John > > > On 6/17/05, John Poltorak <[EMAIL PROTECTED]> wrote: > > > > > > I'm trying to work out how to pass parameters between various modules > > > running under Zope and have got stuck. > > > > > > In the line below, I need to replace the word 'links' with a variable > > > passed by the calling program > > > > > > > > > python:here.parse_file(file=context.links,sepr=',',clone=1)"> > > > > > > I know I can pass the variable using:- > > > > > > > > > > > > > > > > > > Just don't know how to reference it under ZPT. > > > > > > > > > > > > Help! > > > > > > > > > > > > -- > > > John > > > > -- > > Peter Bengtsson, > > work www.fry-it.com > > home www.peterbe.com > > hobby www.issuetrackerproduct.com > > > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Picking up a parameter in a ZPT
--On 17. Juni 2005 16:19:46 +0100 John Poltorak <[EMAIL PROTECTED]> wrote: I'm trying to work out how to pass parameters between various modules running under Zope and have got stuck. In the line below, I need to replace the word 'links' with a variable passed by the calling program python:here.parse_file(file=context.links,sepr=',',clone=1)"> I know I can pass the variable using:- Just don't know how to reference it under ZPT. In the very same way as in DTML using "python: context.test()". If you can read German I suggest to read the FAQs on zope.de otherwise -> Zope Book -> Advanced ZPT... -aj pgpjnI17LDBJV.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Picking up a parameter in a ZPT
Try python:here.parse_file(file=options['parm'],sepr=',',clone=1)"> On 6/17/05, John Poltorak <[EMAIL PROTECTED]> wrote: > > I'm trying to work out how to pass parameters between various modules > running under Zope and have got stuck. > > In the line below, I need to replace the word 'links' with a variable > passed by the calling program > > > python:here.parse_file(file=context.links,sepr=',',clone=1)"> > > I know I can pass the variable using:- > > > > > > Just don't know how to reference it under ZPT. > > > > Help! > > > > -- > John > > > > > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )