Is it possible to create a dictionary from a string value?  Something along these lines (but that works):<br><br>>>> mystring = "{'name':'greg','hatsize':'7 5/8'}"<br>>>> mystring<br>
"{'name':'greg','hatsize':'7 5/8'}"<br>>>> dict(mystring)<br>Traceback (most recent call last):<br>  File "<string>", line 1, in <fragment><br>ValueError: dictionary update sequence element #0 has length 1; 2 is required<br>
>>> <br><br>I would like to return an undetermined (at call time) number of fields from a postgres database (only 1 record) for a given request.  My thought is that I could build a dictionary in the form of a string, return the string and then convert the string value to a dictionary.  I can do that now, but I have to parse the string and then build the dictionary.  Any thoughts or help you could provide would be appreciated.<br>
<br>--greg<br>