stringified cPickle

D

David Bear

I'm rather new to pickling but I have some dictionaries and lists I want to
package and send to another process (on another machine).

I was hoping I could just send a stringified pickle. However, the examples
in the doc have:

I don't really want to write to a file. I know I could write to sys.stdout.
But I'd rather collect the string and do some garbage collect, etc before I
exit the script.

Is there a way to have cPickle just hand me a string?
 
C

Chris Mellon

I'm rather new to pickling but I have some dictionaries and lists I want to
package and send to another process (on another machine).

I was hoping I could just send a stringified pickle. However, the examples
in the doc have:


I don't really want to write to a file. I know I could write to sys.stdout.
But I'd rather collect the string and do some garbage collect, etc before I
exit the script.

Is there a way to have cPickle just hand me a string?

pickle.dumps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top