Hi Chris, <p metal:define-macro="zptmac_clientslist">test</p> # Iam defining a macro to get the values from a pyhton script <span tal:define="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) 1.00 </span> <table tal:define="results list_clients; #--I am using the newly defined variable list_clients and puting it through a loop to print out the values 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 "", size=15, start=start)"><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
John, Again, please don't most in HTML! (My advice would be not to use Outlook Express at all, it's a virus loving buggy piece of crap - use Mozilla, it rulez! But I digress...) zope wrote:
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 "",
Are you sure that it's 'size' that's being omitted? If you are, then why don't you pass a size?
size=15, start=start)"><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.
Urm? I think you're confused. 'size' is the batch size, which is a number you define and will most likely be much smaller than the size of your result set, say 10. If you want to show your whole result set, then why are you using ZTUtils.batch? cheers, Chris
participants (2)
-
Chris Withers -
zope