Home Help Center

Python serialization

MakoMako Member Carlos SandovalOrganization: SharkByteProject: M.O.S. MMO
I have read that the streaming api is not available in python currently but is it possible to read a binary file written out from another application using ICE/Streaming api?


  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    I'm afraid there isn't even an undocumented way to accomplish that right now.

    Take care,
    - Mark
  • smandysmandy Member Andy SmithOrganization: Self EmployedProject: Learning Ice
    Python struct module....

    I've come across the same problem ( reading data in python streamed from java).

    Python's struct module is very useful for achieving this. The marshalling format for ice classes is rather involved but if you limit yourself to streaming ice structs from C++/Java, writing code to unmarshall in python via Struct is quite straightforward. You'll need a few conveneince functions to unmarshal sequences/dictionaries and a function to deal with ice strings + ice's encoding for lengths, but it's not that involved, and performance is very good compared to pickle etc..

    Lets know if you need more info...


Sign In or Register to comment.