Dictionary string parser

Sebastjan Trepca trepca at gmail.com
Tue Nov 22 10:47:16 EST 2005


Hi,

is there any library or some way to parse dictionary string with list,
string and int objects into a real Python dictionary?

For example:

>>> my_dict = dict_parser("{'test':'123','hehe':['hooray',1]}")

I could use eval() but it's not very fast nor secure.

Thanks, Sebastjan



More information about the Python-list mailing list