Hello Group,
from a form i receive a list like this
param = "(34477,36),(34477,8),(34477,9),(39290,36),(39290,8),
(39290,9),"
this is the result of a number of checkboxes, all named "param" and
with values like "(34477,36),"
example:
<input type="checkbox" value="(34477,36)," name="sales"/>
<input type="checkbox" value="(34477,8)," name="sales"/>
when i do
s= eval(param)
on the shell
s is a list of tuples, which is just what i want.
>>> s = eval (param)
>>> s
((34477, 36), (34477, 8), (34477, 9), (39290, 36), (39290, 8), (39290,
9))
>>> s[0]
(34477, 36)
>>> s[0][0]
34477
when i do the same thing in my tg controller, s is a list, too, but
printing out:
s[0][0] returns "(" instead of 34477
what´s the best way to receive the tuples within turbogears just like
i get them in the shell?
or is there a totally different way to pass my list of tuples from the
form?
please help me with this one...
Regards, Frank
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---