#12719: Upgrade to IPython 0.13
----------------------------------------------------------+-----------------
Reporter: kini | Owner: tbd
Type: enhancement | Status:
needs_work
Priority: critical | Milestone:
sage-5.1
Component: packages | Resolution:
Keywords: sd40.5 | Work issues: ??
doesn't show code
Report Upstream: N/A | Reviewers:
Volker Braun, Mike Hansen, Jason Grout
Authors: Mike Hansen, Volker Braun, Jason Grout | Merged in:
Dependencies: | Stopgaps:
----------------------------------------------------------+-----------------
Comment (by jason):
Replying to [comment:49 was]:
> In Sage before this patch, the sage notebook, the Python command line,
etc., we have:
> {{{
> for i in range(10):
> i
> }}}
> outputs the numbers up to 10.
>
> With the new Ipython spkg, etc., we don't.
>
> {{{
> sage: for i in range(10): i
> sage:
> Exiting Sage (CPU time 0m0.07s, Wall time 2m3.22s).
> blastoff:sage wstein$ sage -ipython
> Python 2.7.2 (default, May 17 2012, 13:12:30)
> In [1]: for i in range(10): i
> In [2]:
> }}}
>
> I'm disappointed, especially because I thought this through and in
sagews I recently wrote code so this works correctly in a single cell,
even if there are several instances of this. It's a matter of passing the
'single' option to exec, as is documented in the Python reference. I
wonder why they screwed this up in Ipython 0.12...?
>
> Anyway, I'm not saying this is a show stopper at all - I want the new
ipython in sage. I'm just a little concerned that literally the first
thing I tried shows that they made what I consider a bad design choice.
Hopefully it was just bad luck.
Fernando Perez responded:
BTW, regarding William's comment, that was not a mistake or omission: it
was a very deliberate choice we made after lots of thought. Given that we
manage numbered prompts and history, and that matplotlib produces so many
plots as side effects, after much experimentation we found it worked much
better to only execute with 'interactive' mode the last block.
Sage doesn't distinguish stdout from python sys.displayhook, so the
opposite behavior may be more desirable, but we actually consider that a
'bad design choice' of sage, because it loses an important distinction and
the cache management of output history.
So in summary: our choice is actually sensible and consistent given
IPython's internal design :)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12719#comment:75>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.