[Personal memo] It's a fixed form, but I sometimes forget it, so make a memo.
dump.py
import gzip
import cPickle
obj = 1
with gzip.open('test.pkl.gz', 'wb') as gf:
cPickle.dump(obj, gf, cPickle.HIGHEST_PROTOCOL)
load.py
with gzip.open('test.pkl.gz', 'rb') as gf:
x = cPickle.load(gf)