I have two processes running on different machines with different python versions (2.7 and 2.2 ). I need to know if its easy to pickle a python dictionary in python 2.7 and then unpickle in python 2.2 with same syntax or there is a difference.
msg = {'k1':'v1',...,'k100':'v100'}
pickling in python 2.7
msg = zlib.compress(cPickle.dumps(msg))
msg = encrypt(msg) # pls assume encrypt/decrypt methods md5 hashing
msg = cPickle.dumps(msg)
this is sent inside the url request sent via
urllib2.urlopen(urllib2.Request(destinationURL, msg))
Unpickling in python 2.2
msg = cPickle.loads(msg)
msg = decrypt(msg) # decryption then md5 hashing (msg)
msg = cPickle.loads(zlib.decompress(msg))
this 'msg' is in unreadable format which the python 2.2 process is unable to use, so it is sending an error message which contains 'Message Format Invalid'
Actual issue is in Unpickling in python 2.2. Any help to properly format the string to get a response would be appreciated. I apologize for making some of you wait, I could not get access to remote machine yesterday, kindly reopen if you feel its not been answered elsewhere.