How does pickle work?

June 18th, 2007 § 0 comments

Via Brett Can­non I had the plea­sure of read­ing Alexan­dre Vassalotti’s blog post: “Pickle: An Inter­est­ing Stack lan­guage”. It’s really an excel­lent read — I never quite grokked pickle (or it’s brother, cPickle) the code in his post actu­ally taught me about some­thing else: the “code” mod­ule. To quote:

The code mod­ule pro­vides facil­i­ties to imple­ment read-eval-print loops in Python. Two classes and con­ve­nience func­tions are included which can be used to build appli­ca­tions which pro­vide an inter­ac­tive inter­preter prompt.

So much to learn I have. It really is a great post — I’ve only ever used pick­led for pass­ing an object (or an object in a set state) from either one run of an appli­ca­tion to the next (i.e: a cache) or from one machine to another (via mul­ti­ple copy-like func­tions, yes I know about pyro)

What's this?

You are currently reading How does pickle work? at jessenoller.com.

meta