Re: [Tutor] html and mod_python

2006-03-27 Thread Patty
> Can you please give me a quick example of how to do this: Nevermind. I figured it out. Thanks anyway :-) Patty ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] html and mod_python

2006-03-27 Thread Patty
Hi, Can you please give me a quick example of how to do this: > Then change printbox() to create the > tag using a loop over the value. For each value, check to see if it is > the same as the value passed in and generate the appropriate option tag. The way i have it right now is:

Re: [Tutor] html and mod_python

2006-03-23 Thread Patty
> So, replace all the 10%, 20% etc in your string > with 10%% and 20%%. > Thanks That fixed it all. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] html and mod_python

2006-03-23 Thread Tim Golden
[Patty] | I tried the following piece of code and got : | | "TypeError: not enough arguments for format string" | | tag = """ | | %s | | - | 0% | 10% | 20% [... snip similar lines ...] | """ % (selected_value,selected_value)

Re: [Tutor] html and mod_python

2006-03-23 Thread Patricia G.
Hi again! result[0] is the value i got from the database. I tried the following piece of code and got :  "TypeError: not enough arguments for format string"    if result [0] in range(0, 101, 10):     selected_value = result[0]     else:     selected_value = '-'     ta

Re: [Tutor] html and mod_python

2006-03-23 Thread Patty
Hi again! result[0] is the value i got from the database. I tried the following piece of code and got : "TypeError: not enough arguments for format string" if result [0] in range(0, 101, 10): selected_value = result[0] else: selected_value = '-' t

Re: [Tutor] html and mod_python

2006-03-23 Thread Kent Johnson
Patty wrote: > Hi! > > I created a form in a python file that takes values selected from 6 different > drop down boxes: > > for target in all_targets: >s = s + "" >s = s + "" % target >s = s + "" >for host in hosts: >if target in ants_map[host]: >

Re: [Tutor] html and mod_python

2006-03-22 Thread Adam Cripps
On 3/23/06, Patty <[EMAIL PROTECTED]> wrote: > Hi! > > I created a form in a python file that takes values selected from 6 different > drop down boxes: > > for target in all_targets: >s = s + "" >s = s + "" % target >s = s + "" >for host in hosts: >if tar

[Tutor] html and mod_python

2006-03-22 Thread Patty
Hi! I created a form in a python file that takes values selected from 6 different drop down boxes: for target in all_targets: s = s + "" s = s + "" % target s = s + "" for host in hosts: if target in ants_map[host]: s = s + printbox()