December 5th, 2001, 10:33 AM
Changing a list into a string??
I want to write a list into a file within my cgi script. However I keep getting errors telling me that the arument must be a string or a read-only character buffer and not a list.
Does anyone know how to change a list into a string?
December 6th, 2001, 05:25 AM
Use pickle for serializing the contents of the list. The description of usage is found in the link above, but for speed you should use cPickle, which can be up to 1000 times faster, because it has been reimplemented in C iso Python.
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs