How to serialize and deserialize the objects into memory?

Discussion in 'Python' started by hardemr, Jul 11, 2008.

  1. hardemr

    hardemr Guest

    Hello Everyone,

    I want to serialize and deserialize the objects into Memory not into
    file. How can i do that?

    Best Regards,
     
    hardemr, Jul 11, 2008
    #1
    1. Advertising

  2. hardemr schrieb:
    > Hello Everyone,
    >
    > I want to serialize and deserialize the objects into Memory not into
    > file. How can i do that?



    Use pickle & module StringIO/cStringIO as file-to-memory-object.

    Diez
     
    Diez B. Roggisch, Jul 11, 2008
    #2
    1. Advertising

  3. hardemr wrote:
    > Hello Everyone,
    >
    > I want to serialize and deserialize the objects into Memory not into
    > file. How can i do that?


    You want to serialize the objects, but only keep them in memory? That
    hardly makes any sense. Serialization is need if you want to store your
    objects in a file or if you want to communicate (via network) with other
    processes.

    -- Gerhard
     
    Gerhard Häring, Jul 11, 2008
    #3
  4. hardemr

    Guest

    On Jul 11, 12:58 pm, hardemr <> wrote:
    > Hello Everyone,
    >
    > I want to serialize and deserialize the objects into Memory not into
    > file. How can i do that?


    pickle.dumps and pickle.loads.

    --Inyeol
     
    , Jul 11, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gordz
    Replies:
    3
    Views:
    3,985
    John Oakes
    Jun 7, 2004
  2. Edmond wong
    Replies:
    2
    Views:
    6,077
    Edmond wong
    Apr 29, 2005
  3. Replies:
    1
    Views:
    872
    David Linsin
    Apr 22, 2006
  4. MariuszK
    Replies:
    0
    Views:
    813
    MariuszK
    Mar 19, 2007
  5. Don
    Replies:
    0
    Views:
    245
Loading...

Share This Page