I have been working to build a complex data structure which would return a dictionary. Currently that class return string object of the form
{ cset : x,
If you are careful enough to keep the code valid python, you could use eval:
eval
eval(yourlongstring)