I have created a function which returns from a given url some info parsed 
from the file in the url

http://url/file.txt
and it returns something like this

parser.py output:
_name: Test1
_data: [{"year": 2013, "jan": 50, "feb": 60}, {"year": 2012, "jan": 40, 
"feb": 30}]

def add():
  ..
  item = parser(form.vars.url)
  redirect(URL('confirm', vars=vars(item)))
  ..

in confirm()

if i do `print request.get_vars['_data'].__class__`
the result is a list

if i do `print request.get_vars['_data'][0].__class__`
the result is a string and its something like this: ["{"year": 2013, "jan": 
50, "feb": 60}", "{"year": 2012, "jan": 40, "feb": 30}"], 
but i have to transform it back into dict so to proceed with the 
db.table.insert

any idea on how to handle this?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to