Pickling is fine, use cPickle for efficiency. However you should not write it to a file. Rather use some other IPC mechanisms, like sockets or pipes (i.e. see http://stackoverflow.com/search?q=python+named+pipeshttps://stackoverflow.com/search?q=python+named+pipes) that avoid the disk-overhead.