This is an interesting coincidence. I happened upon this a few days ago for the first time and it worked out really wonderfully.
I needed to transfer data from a python script to a ruby script. Ended up looking like this:
Python script:
import msgpack
msg = msgpack.packb(some_data)
sys.stdout.write(msg)
Ruby script: require 'msgpack'
msg = `python my_script.py`
some_data = MessagePack.unpack(msg)