#7648: notebook: issue with indentation of first line being wrong
------------------------+---------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: minor | Milestone: sage-4.3
Component: notebook | Keywords:
Work_issues: | Author:
Upstream: N/A | Reviewer:
Merged: |
------------------------+---------------------------------------------------
{{{
On 11/27/2009 05:47 AM, Minh Nguyen wrote:
> On Fri, Nov 27, 2009 at 9:10 PM, Yotam Avital <> wrote:
>> for i in range (1,5):
>> print '%6s %6s %6s'%(i, i^2, i^3)
I think *part* of the problem could be line 294 of
sagenb.interfaces.expect:
s = s.strip().rstrip(self._prompt)
Replacing this with
s = s.rstrip(self._prompt)
appears to restore the expected spacing. But quitting and reopening the
worksheet puts
1 1 1
2 4 8
3 9 27
4 16 64
in the output cell. I think the problem here is line 910 (or so) of
sagenb.notebook.cell:
out = '///\n' + out.strip()
Replacing this with
out = '///\n' + out.strip('\n')
seems to solve this problem. It also makes the text representation of
the worksheet more compact.
Note: I haven't tested these changes extensively.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7648>
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.