converting string to dict ?
Radovan Garabik
garabik-news at spam.melkor.dnp.fmph.uniba.sk
Wed Apr 11 06:37:27 EDT 2001
Jason Cunliffe <jasonic at nomadicsltd.com> wrote:
: A web input form passes {'name':'Cleopatra'} as a string.
: Please, is there a nice clean function to convert this string to a dict?
maybe not clean, but try dict = eval("{'name':'Cleopatra'}")
--
-----------------------------------------------------------
| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik |
| __..--^^^--..__ garabik @ fmph . uniba . sk |
-----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!
More information about the Python-list
mailing list