rendered paste bodyZPT
<form method=get action=".">
<table border="1" width="50%">
<tr>
<th>Consultar</th>
<td><input type="text" name="consulta_cliente" value="" maxlenght="40" size="40" style="text-transform:uppercase;"> <input type="submit" value="Consultar" name="consulta_cliente_py:method"></td>
</tr>
</table><br/>
</form>
<table border="1">
<metal:block tal:define="items python:here.consulta_cliente_py(request.get('consulta'))">
tal:condition="exists:items"
tal:repeat="resultados items">
<tr tal:define="pintar repeat/resultados/even"
tal:attributes="bgcolor python:test(pintar, '#FFFFE0', '#FFFFFF')">
<td><p tal:content="resultados/nomefantasia"/></td>
</tr>
</metal:block>
</table>
PYScript
# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE = request.RESPONSE
nome_para_consulta = consulta_cliente.upper()
consulta = context.zsql_select_cliente(nomefantasia=nome_para_consulta)
return consulta