[IPython-dev] saving state of ipython session to a pickled file

Michael McKerns mmckerns@caltech....
Fri Aug 23 14:47:41 CDT 2013


Thomas,

Yep.  My fix was to treat them like singletons, and then pop them from
the copy of __main__.__dict__ that I serialize.  So as long as that
assumption is not broken, that should take care of it.

I didn't see anything else in some limited testing... and could run a
few commands, and save the session... and start up again and have
full history and any interactively built functions and stuff within the
limits of what dill does in normal python.

Guys, let me know if you see anything else...


> The technical details: 'exit' and 'quit' are singletons in that we only
> create the one instance of ExitAutocall (the two names refer to the same
> object). The class itself doesn't do anything to prevent there being
> further instances of it, but there's no obvious reason why you would make
> any more. It's also possible to reassign 'exit' or 'quit', but it's
> non-trivial, because of the way we rewrite the syntax.
>
> Thomas
>
>
> On 23 August 2013 12:19, Michael McKerns <mmckerns@caltech.edu> wrote:
>
>> I just pushed an update that *should* fix this bug:
>> https://bugs.launchpad.net/ipython/+bug/488953
>>
>> detailed by this question:
>> http://stackoverflow.com/questions/18381348/dill-dump-session-with-ipython
>>
>> The updates to dill have been posted to github at
>> https://github.com/uqfoundation,
>> and the on the issue tracker
>> http://trac.mystic.cacr.caltech.edu/project/pathos/ticket/131.
>> Until I post a new tarball, dill+ipython users should use the version
>> off
>> of the github link.
>>
>> There might be other "magic" things that ipython does that I'm not
>> catching...
>> but this change should make sure the default ones that ipython uses are
>> fine.
>>
>> ---
>>
>> Mike McKerns
>> California Institute of Technology
>> http://www.its.caltech.edu/~mmckerns
>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>


---

Mike McKerns
California Institute of Technology
TEL: (626)395-5773 or (626)590-8470
http://www.its.caltech.edu/~mmckerns
mmckerns@caltech.edu



More information about the IPython-dev mailing list