<!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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regarding python scripts:&nbsp; 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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>For examples, have a look at the Python(Script) 
section of:&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Jonathan</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</P>
  <P>Thanks for the pointers,</P>
  <P>&nbsp;</P>
  <P>Larry<BR></P>
  <BLOCKQUOTE 
  style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- 
    Original message from "Jonathan" &lt;dev101@magma.ca&gt;: -------------- 
    <BR><BR><BR>&gt; <BR>&gt; ----- Original Message ----- <BR>&gt; From: 
    larrymcdonnell@att.net <BR>&gt; To: zope@zope.org <BR>&gt; Sent: Tuesday, 
    September 05, 2006 1:30 PM <BR>&gt; Subject: [Zope] Problems with lists 
    <BR>&gt; I use the the following dtml commands to populate the db. <BR>&gt; 
    <BR>&gt; <SNIP><BR>&gt; <BR>&gt; <DTML-CALL ?REQUEST.set(?counter?, 
    REQUEST.SESSION[?counter?])?><BR>&gt; <DTML-CALL 
    ?REQUEST.set(?loop_counter_temp?, ?0?)?><BR>&gt; <DTML-CALL 
    ?string_to_int(loop_counter_temp ,REQUEST)?><BR>&gt; <DTML-CALL 
    ?REQUEST.set(?loop_counter?, y)?><BR>&gt; <DTML-CALL 
    ?REQUEST.set(?loop_counter?, 1)?><BR>&gt; <DTML-IN 
    expr="_.range(counter)"><BR>&gt; <DTML-CALL ?REQUEST.set(?student_score1?, 
    <BR><BR>&gt; <DTML-CALL <BR ?REQUEST.set(?student_score2?,><BR>&gt; 
    <DTML-CALL <BR re3?, ?REQUEST.set(?student_sco><BR>&gt; <DTML-CALL <BR 
    ?REQUEST.set(?student_score4?,><BR>&gt; <DTML-CALL <BR 
    ?REQUEST.set(?student_score5?,><BR>&gt; </DTML-IN><BR>&gt; <DTML-CALL 
    expr="create_holistic_score_record(REQUEST)"><BR>&gt; <BR>&gt; But these are 
    the results: <BR>&gt; <BR>&gt; REQUEST <BR>&gt; form <BR>&gt; 
    student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] <BR>&gt; Submit 
    'Submit' <BR>&gt; student_score2_temp ['3', '3', '3', '3', '3', '3', '3', 
    '3'] <BR>&gt; student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] 
    <BR>&gt; student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] 
    <BR>&gt; student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] 
    <BR>&gt; </SNIP><BR>&gt; <BR>&gt; I can't figure out what your dtml prior to 
    the loop is trying to accomplish, <BR>&gt; however inside the loop your 
    'loop_counter' variable is a constant value (it <BR>&gt; does not change, so 
    you keep referring to the same list element). You need <BR>&gt; something 
    like: <BR>&gt; <BR>&gt; <DTML-IN r="_.range(counter)" exp><BR>&gt; 
    <DTML-CALL ?REQUEST.set(?student_score1?, <BR><BR>&gt; <BR>&gt; The 
    _['sequence-item'] will contain the current iteration result of your 
    <BR>&gt; _.range(counter) statement. <BR>&gt; <BR>&gt; Better yet, do this 
    in a python script (way easier). <BR>&gt; <BR>&gt; <BR>&gt; hth <BR>&gt; 
    <BR>&gt; Jonathan <BR>&gt; <BR>&gt; <BR>&gt; </BLOCKQUOTE></BLOCKQUOTE><!-- END WEBMAIL STATIONERY --></BODY></HTML>