<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><!-- BEGIN WEBMAIL STATIONERY -->
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Pls keep your posts on the list...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regarding python scripts: the best place to
start would be the Basic Scripting section of the Zope Book, which you can find
here:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><A
href="http://www.plope.com/Books/2_7Edition/BasicScripting.stx">http://www.plope.com/Books/2_7Edition/BasicScripting.stx</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For examples, have a look at the Python(Script)
section of: </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><A
href="http://zopelabs.com/">http://zopelabs.com/</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=larrymcdonnell@att.net
href="mailto:larrymcdonnell@att.net">larrymcdonnell@att.net</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=dev101@magma.ca
href="mailto:dev101@magma.ca">Jonathan</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, September 05, 2006 2:23
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Zope] Problems with
lists</DIV>
<DIV><BR></DIV><!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<P>Hi,</P>
<P> </P>
<P>I am sending this to you versus the list. Everyone says to use Python but I
am the kind of guy who needs an example. But I am having a hard time finding
the Zope/Python related examples. If you could point me in the right direction
or one of your site that would be great.</P>
<P> </P>
<P>Thanks for the pointers,</P>
<P> </P>
<P>Larry<BR></P>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">--------------
Original message from "Jonathan" <dev101@magma.ca>: --------------
<BR><BR><BR>> <BR>> ----- Original Message ----- <BR>> From:
larrymcdonnell@att.net <BR>> To: zope@zope.org <BR>> Sent: Tuesday,
September 05, 2006 1:30 PM <BR>> Subject: [Zope] Problems with lists
<BR>> I use the the following dtml commands to populate the db. <BR>>
<BR>> <SNIP><BR>> <BR>> <DTML-CALL ?REQUEST.set(?counter?,
REQUEST.SESSION[?counter?])?><BR>> <DTML-CALL
?REQUEST.set(?loop_counter_temp?, ?0?)?><BR>> <DTML-CALL
?string_to_int(loop_counter_temp ,REQUEST)?><BR>> <DTML-CALL
?REQUEST.set(?loop_counter?, y)?><BR>> <DTML-CALL
?REQUEST.set(?loop_counter?, 1)?><BR>> <DTML-IN
expr="_.range(counter)"><BR>> <DTML-CALL ?REQUEST.set(?student_score1?,
<BR><BR>> <DTML-CALL <BR ?REQUEST.set(?student_score2?,><BR>>
<DTML-CALL <BR re3?, ?REQUEST.set(?student_sco><BR>> <DTML-CALL <BR
?REQUEST.set(?student_score4?,><BR>> <DTML-CALL <BR
?REQUEST.set(?student_score5?,><BR>> </DTML-IN><BR>> <DTML-CALL
expr="create_holistic_score_record(REQUEST)"><BR>> <BR>> But these are
the results: <BR>> <BR>> REQUEST <BR>> form <BR>>
student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] <BR>> Submit
'Submit' <BR>> student_score2_temp ['3', '3', '3', '3', '3', '3', '3',
'3'] <BR>> student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3']
<BR>> student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4']
<BR>> student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5']
<BR>> </SNIP><BR>> <BR>> I can't figure out what your dtml prior to
the loop is trying to accomplish, <BR>> however inside the loop your
'loop_counter' variable is a constant value (it <BR>> does not change, so
you keep referring to the same list element). You need <BR>> something
like: <BR>> <BR>> <DTML-IN r="_.range(counter)" exp><BR>>
<DTML-CALL ?REQUEST.set(?student_score1?, <BR><BR>> <BR>> The
_['sequence-item'] will contain the current iteration result of your
<BR>> _.range(counter) statement. <BR>> <BR>> Better yet, do this
in a python script (way easier). <BR>> <BR>> <BR>> hth <BR>>
<BR>> Jonathan <BR>> <BR>> <BR>> </BLOCKQUOTE></BLOCKQUOTE><!-- END WEBMAIL STATIONERY --></BODY></HTML>