Convert string to command..
Hrvoje Niksic
hniksic at xemacs.org
Thu Oct 18 12:40:32 EDT 2007
Abandoned <besturk at gmail.com> writes:
> Sorry i can't understand :(
> Yes my database already has data in the "{..}" format and i select
> this and i want to use it for dictionary..
But, do you use Python to create that data? If so, simply convert it
to pickle binary format instead of "{...}". As explained in my other
post:
> id-1 | all
> 56 {68:66, 98:32455, 62:655}
If you use Python to create this cache table, then simply don't dump
it as a dictionary, but as a pickle:
id-1 | all
56 <some weird string produced by cPickle.dumps>
When you load it, convert the string to dict with cPickle.loads
instead of with eval.
More information about the Python-list
mailing list