At the very least, the IPython source will hopefully help you figure out their format.