On Apr 8, 2007, at 6:36 AM, tml wrote:
>
> Hi,
>
> Thanks for the replise. I tried the function given and also
> cgi.parse_qs. Unfortunatley it only works partially. The expected
> behaviour like the way turbogear sees it is not the same. I realized i
> dont need args parsing, just kw is fine. But both above args dont do
> it fully like TG does.
>
> For example for a query like:
> a=1&b=2&c.0.1=3&c.0.2=4&c.1.1=5&c.1.2=6&d.0=arg1&d.0=arg2
>
> Turbogears gets this kw argument as:
>
> kw =
> {'a': '1',
> 'b': '2',
> 'c': {'1': {'1': '5', '2': '6'}, '0': {'1': '3', '2': '4'}},
> 'd': {'0': ['arg1', 'arg2']}}
>
> This is what i would like to decode my string into, so i can pass this
> argument to the widget.render. Does anyone know how to achieve this
> with fully feature? note how the multiple nested dicts and arrays
> work. This isn't simply about parsing a=1&b=2, etc... The above
> structure is very nice and organized so i can specify a range of
> parameters to my apps.
>
> thanks.
take a look at http://tinyurl.com/2789xq
Alberto
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---