#!/usr/bin/env python from sys import argv from pickle import load print(load(open(argv[1], 'rb'))) ''' Shell transcript showing pickling from python + usage of this script: bash-4.0$ touch picklestorage bash-4.0$ rlwrap python3.0 Python 3.0rc1 (r30rc1:66499, Dec 5 2008, 12:15:36) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> picklestorage = open('picklestorage', 'wb') # write in binary mode >>> pickle.dump(['arbitrary data', 0x100, {'foo': 'bar'}], picklestorage) >>> ^D bash-4.0$ python3.0 unpickle.py picklestorage ['arbitrary data', 256, {'foo': 'bar'}] '''