stringified cPickle

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Bear

    #1

    stringified cPickle

    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:
    [color=blue][color=green][color=darkred]
    >>> import pickle
    >>> pickle.dump(obj ,open('save.p', 'w'))[/color][/color][/color]

    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?

    --
    David Bear
    -- let me buy your intellectual property, I want to own your thoughts --
Working...