Most tutorials on compressing a file in Python involve immediately writing that file to disk with no intervening compressed python object. I want to know how to pickle and then
bz2.compress(pickle.dumps(some_object))