serialize object in jython, read into python

py codecraig at gmail.com
Thu Dec 22 14:49:17 EST 2005


I want to serialize an object in jython and then be able to read it in
using python, and vice versa.

Any suggestions on how to do this?  pickle doesnt work, nor does using
ObjectOutputStream (from jython).

I prefer to do it file based ...something like

pickle.dump(someObj, open("output.txt", "w"))

as opposed to shelve

f = shelve.open("output.txt")
f['somedata'] = someObj

Thanks for the help in advance.




More information about the Python-list mailing list