Archived

This forum has been archived. Please start a new discussion on GitHub.

Write/Read sequence of Ice structss to/from file

Hi,

I have a sequence of ice objects in python and want to dump them to a file. Later I want to read in the sequence again.

What is the best way to do that? cPickle is terribly slow.

Since Ice has to perform similar operations when sending sequences over sockets, I assume that there have to be appropriate methods?

Thanks and regards,

Roland

Comments

  • Look at Dynamic Ice.
  • mes
    mes California
    Look at Dynamic Ice.
    Dynamic Ice would be a solution in some language mappings, but unfortunately not yet in Python. I'm afraid I can't offer a better alternative to cPickle at the moment.

    Regards,
    Mark
  • mes wrote: »
    Dynamic Ice would be a solution in some language mappings, but unfortunately not yet in Python. I'm afraid I can't offer a better alternative to cPickle at the moment.

    Regards,
    Mark

    Thanks for looking into it. After experimenting a bit with dumping the Ice structs as python code, I think I am going to use C++ and the streaming interface for this.

    BTW: It might be useful for Ice Objects to inherit from a common abstract base class (similar to PEP 3141 -- A Type Hierarchy for Numbers).

    Cheers,

    Roland