[IPython-dev] messaging protocol

Thomas Kluyver takowl at gmail.com
Sat Apr 9 08:21:15 EDT 2011

On 9 April 2011 07:30, Jason Grout <jason-sage at creativetrax.com> wrote:

> Interesting.  So execution count really is just a counter on executions
> where the namespace is preserved.  What do you mean by "namespace is
> preserved"?  How do you test for it?

Well, if I do "a=12" <compute>, "a" <compute>, I will get 12 back if the
namespace is preserved, but get a NameError if not. A quick test with aleph
suggests that it's not, so each run is effectively a one-cell session.
Likewise, in IPython trunk, if you do %reset, it nukes your namespace, gets
a new history session, and sets the execution counter back to 1.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20110409/8981872e/attachment.html>

More information about the IPython-dev mailing list