Environment:
Every time I shut down a IPython notebook and re-open it, I have to re-run all the cells. But some cells
Unfortunately, it doesn't seem like there is something as convenient as an automatic cache. The %store
magic option is close, but requires you to do the caching and reloading manually and explicitly.
a = 1
%store a
Now, let's say you close the notebook and the kernel gets restarted. You no longer have access to the local variables. However, you can reload the variables you've stored using the -r
option.
%store -r a
print a # Should print 1