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">&lt;<a href="mailto:garry@schoolteachers.co.uk">garry@schoolteachers.co.uk</a>&gt;</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 &#39;column&#39; 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 &quot;&quot;&quot;&lt;select name=&quot;nonboolean&quot; method=&quot;post&quot;&gt;&quot;&quot;&quot;<br>
command=context.column()<br>
<br>
for row in command:<br>
     code=row.code<br>
     meaning=row.meaning<br>
     print &quot;&quot;&quot;&lt;option value=&quot;%s&quot;&gt;%s&lt;/option&gt;&quot;&quot;&quot; &amp;(code,meaning)<br>
<br>
print &quot;&quot;&quot;&lt;/select&gt;&quot;&quot;&quot;<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>