converting to string

Joshua Moore-Oliva josh at chatgris.com
Wed Aug 4 03:34:32 EDT 2004


Actually, I believe that marshal is the most efficient method to convert a python object to a string.

http://docs.python.org/lib/module-marshal.html

Joshua Moore-Oliva


On August 4, 2004 03:03 am, Ajay Brar wrote:
> hi!
> 
> how do i go about converting a Python object or tuple to a string.
> i am currently doing
> import cPickle as pickle
> str = pickle.dumps(obj)
> 
> is that efficient? is that the best way to do it?
> 
> thanks
> 
> cheers
> 
> -- 
> Ajay Brar
> CS Honours 2004
> Smart Internet Technology Research Group
> 
> http://www.it.usyd.edu.au/~abrar1
> 



More information about the Python-list mailing list