marshalling data structures between perl <-> php <-> python

Skip Montanaro skip at pobox.com
Fri Dec 21 15:16:27 CET 2001


    Tripp> aside from using XML-RPC, what python module can i use to
    Tripp> marshall data structures (possibly a combination of lists,
    Tripp> dictionaries, and scalars of ints, floats, ascii strings, and
    Tripp> null values) between these three languages? i prefer a compact,
    Tripp> common binary format rather than XML.

Dunno about "common", but there is a Python version of marshal that Guido
wrote for JPython.  You could translate that to Perl and PHP.  I have a copy
lying about if you need it.

XML-RPC streams could also be compressed using zlib and the equivalent
libraries on Perl and PHP.  That would make it both compact and binary. ;-)

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list