[Zope] re: generating python scripts on the fly

Oleg Broytmann Oleg Broytmann <phd@phd.fep.ru>
Wed, 6 Jun 2001 00:39:35 +0400 (MSD)


On Tue, 5 Jun 2001, Tom Palermo wrote:
> You need this line:
> container.manage_addProduct['PythonScripts'].manage_addPythonScript(id,
> REQUEST=None). I looked in the Zope book but it doesn't really explain
> manage_addProduct very well.

   Please note that manage_addProduct used here with square brackets [],
not parenthesises (). Hence it is not a function!
   In reality this manage_addProduct is a product "manager" that returns
pointer to the named Product.
   So you asked the manager to give you a pointer to the PythonScript
Product, and called manage_addPythonScript from this Product. Just so
simple!

Oleg.
----
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.