python shell: pickle entire state
When using either " ipython " or " code.interact(local=locals()) ", I'd like to have a way to save the entire program address space into a pickle file, and similarly a way to load such a file and then start executing in that context. This should be totally possible for simple scripts because of virtual memory. All defined names (and the non-orphaned objects they point to), from locals up through globals and global functions, would be pickled. When unpickling, those names would be assigned again, at their original scope. Assume that the program doesn't use the network, so state discontinuity