re: generating python scripts on the fly
This helped me answer my own question:http://www.zope.org/Members/jwashin/convertPMtoPS. 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.
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.
participants (2)
-
Oleg Broytmann -
Tom Palermo