> I solved (partially) my problem: very thanks.
> I studied acquisition and then I understood your example.
> I've another problem (the last, I hope): I call some ZSQLMethod from
> Python scripts so I need to execute a command dynamically.
> I need to execute
> 'container.include.sql.%s.getX()' % container.REQUEST.SESSION['dbconn']
> but 'exec' is not allowed. Does exist another way or I have to write:
> if container.REQUEST.SESSION['dbconn'] == 'conn1':
> elif container.REQUEST.SESSION['dbconn'] == 'conn2':
> elif ...
> In ZPT pages I use python:path('python:container.%s.getX()' % var) without
> problem but I don't knoe how do the same thing in a script python.
Well, thats just python - I'd suggest skimming thru the python
tutorial at python.org at least.
You reach objects by getattr(parent,attributename)
And in Zope also via:
This should get you going I think.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -