[Zope] Problem with ZTUtils

zope zope@stylusinc.net
Mon, 29 Jul 2002 09:02:01 +0530


This is a multi-part message in MIME format.

------=_NextPart_000_002A_01C236DE.99E5F7A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Chris,

<p metal:define-macro=3D"zptmac_clientslist">test</p> # Iam defining a =
macro to get the values from a pyhton script
     <span tal:define=3D"global list_clients =
python:container.learning.oms_client.pget_clients">
#i have defined a variable called list_clients to store the values from =
the recordset which is stored in the pythonscript
(pget_vlients)
  =20
   1.00
     </span>      =20
    =20
<table tal:define=3D"results  list_clients;
 #--I am using the newly defined variable list_clients and puting it =
through a loop to print out the values=20

                    start request/start|python:0;
                    batch python:modules['ZTUtils'].Batch(results,  # =
Here i am having the problem that i have to give a number for size in =
ZTUtils else it show me an error
Error Type: TALESError
Error Value: exceptions.TypeError on __init__() takes at least 3 =
non-keyword arguments (2 given) in "",=20
                                                          size=3D15,=20
                                                         =
start=3Dstart)"><tr>
          How can i get a value of the number of records in the record =
set dynamically
So that i dont have to specify the size explicitly when i am =
coding.Since i may not be knwing the size.
PLeasehelp me out
.I hope my mail with the comments has clearly explained the problem.If =
there is someone going through such a phase of development could u =
please spare some time to help me out.
Regards
John Kunchandy


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002

------=_NextPart_000_002A_01C236DE.99E5F7A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Chris,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;p=20
metal:define-macro=3D"zptmac_clientslist"&gt;test&lt;/p&gt; # Iam =
defining a macro=20
to get the values from a pyhton script<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;span=20
tal:define=3D"global list_clients=20
python:container.learning.oms_client.pget_clients"&gt;<BR>#i have =
defined a=20
variable called list_clients to store the values from the recordset =
which is=20
stored in the pythonscript<BR>(pget_vlients)<BR>&nbsp;&nbsp; =
<BR>&nbsp;&nbsp;=20
1.00<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/span&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&lt;table tal:define=3D"results&nbsp; list_clients;<BR>&nbsp;#--I am =
using the=20
newly defined variable list_clients and puting it through a loop to =
print out=20
the values </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
start=20
request/start|python:0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
batch python:modules['ZTUtils'].Batch(results,&nbsp; # Here i am having =
the=20
problem that i have to give a number for size in ZTUtils else it show me =
an=20
error<BR>Error Type: TALESError<BR>Error Value: exceptions.TypeError on=20
__init__() takes at least 3 non-keyword arguments (2 given) in "",=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
size=3D15,=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
start=3Dstart)"&gt;&lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;=20
How can i get a value of the number of records in the record set=20
dynamically<BR>So that i dont have to specify the size explicitly when i =
am=20
coding.Since i may not be knwing the size.<BR>PLeasehelp me out<BR>.I =
hope my=20
mail with the comments has clearly explained the problem.If there is =
someone=20
going through such a phase of development could u please spare some time =
to help=20
me out.<BR>Regards<BR>John Kunchandy</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>---<BR>Outgoing mail is certified =
Virus=20
Free.<BR>Checked by AVG anti-virus system (<A=20
href=3D"http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: =
6.0.380 /=20
Virus Database: 213 - Release Date: 7/24/2002</FONT></DIV></BODY></HTML>

------=_NextPart_000_002A_01C236DE.99E5F7A0--