Opened 13 years ago
Closed 13 years ago
#7648 closed defect (fixed)
notebook: issue with indentation of first line being wrong
Reported by: | William Stein | Owned by: | William Stein |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.3.1 |
Component: | notebook | Keywords: | |
Cc: | Merged in: | sagenb-0.6 | |
Authors: | Mitesh Patel | Reviewers: | Tim Dumol |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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.
Attachments (1)
Change History (5)
Changed 13 years ago by
Attachment: | trac_7648-missing_indent.patch added |
---|
comment:1 Changed 13 years ago by
Authors: | → Mitesh Patel |
---|---|
Status: | new → needs_review |
The Se tests pass. Unfortunately, sage -t sagenb/notebook
yields several
A mysterious error (perhaps a memory error?) occurred, which may have crashed doctest.
Please see #7650.
comment:2 Changed 13 years ago by
comment:4 Changed 13 years ago by
Merged in: | → sagenb-0.6 |
---|---|
Resolution: | → fixed |
Reviewers: | → Tim Dumol |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
Make the changes in the ticket description. sagenb repo.