[IPython-user] Alternative %store behavior

Yichun Wei yichun.wei@gmail....
Sat Apr 19 11:21:39 CDT 2008


 Maybe I am among the ones that "abuse" the IPython persistence system.
 With IPython I use %store to save variables, and they come back in
 later sessions automatically, very convenient if additional operation
 on these variables is needed. But soon I started to stuff in the db
 objects as large as several MB, which slows down the start up of any
 IPython session considerately since it automatically loads every
 variable back even when I do not want to bother with those variables.

 So, may I request a feature that loads variable only when needed? It
 is straight-forward and easy when having a look at
 Extensions/pspersistence.py. So why this email? From the use pattern
 of myself, IPython's persistence system (%store) can/should help
 people do much more than it provides at this moment. Say, it is not
 unusual a user needs to store things that are versioned (yes,
 versioned data!). I am aware multiple efforts are discussed like
 notebooks and/or ZODB backend for the future of IPython persistence
 system, but with minimal modification on the current %store's behavior
 one can achieve a bit.

 I am attaching an example extension file as a proof of concept, feel
 free to try it out and modify as needed. It is modified from Ville's
 version. In order to coexists with %store, I changed the name to %jot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jot.py
Type: text/x-python
Size: 9491 bytes
Desc: not available
Url : http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20080419/a33d5b56/attachment.py 

More information about the IPython-user mailing list