getattr(context, column)()?<div><br></div><div>-aj<br><br><div class="gmail_quote">On Wed, Nov 25, 2009 at 19:53, Garry Saddington <span dir="ltr"><<a href="mailto:garry@schoolteachers.co.uk">garry@schoolteachers.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am passing a variable named 'column' to the following script and<br>
trying to fill a select box with the result of a zsqlmethod chosen<br>
dynamically using this variable.<br>
<br>
print """<select name="nonboolean" method="post">"""<br>
command=context.column()<br>
<br>
for row in command:<br>
code=row.code<br>
meaning=row.meaning<br>
print """<option value="%s">%s</option>""" &(code,meaning)<br>
<br>
print """</select>"""<br>
return printed<br>
<br>
<br>
<br>
I can not work out how to substitiute the command with the variable, any<br>
help much appreciated.<br>
Regards<br>
Garry<br>
_______________________________________________<br>
Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zope" target="_blank">https://mail.zope.org/mailman/listinfo/zope</a><br>
** No cross posts or HTML encoding! **<br>
(Related lists -<br>
<a href="https://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">https://mail.zope.org/mailman/listinfo/zope-announce</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
</blockquote></div><br></div>