mumebuhi a écrit : > Hi, > > Is it possible to send a non-string object from a Python program to > another? I particularly need to send a dictionary over to the other > program. However, this is not possible using the socket object's send() > function. > > Help?
>>> d = dict(one=1, two="three", question="life, universe, and everything") >>> import simplejson >>> s = simplejson.dumps(d) >>> s '{"question": "life, universe, and everything", "two": "three", "one": 1}' >>> simplejson.loads(s) == d True http://cheeseshop.python.org/pypi/simplejson If you *really* want to "share" objects between programs, there are way to do so (pyro comes to mind). But this gets more complicated... -- http://mail.python.org/mailman/listinfo/python-list