Opened 11 years ago

Closed 11 years ago

#2992 closed defect (fixed)

[with patch; positive review] notebook -- help(foo) in the notebook should not word wrap

Reported by: was Owned by: boothby
Priority: major Milestone: sage-3.0.2
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This is *very* easy to implement:

  1. Make it so help is a wrapper around internal help. (Already true?)
  1. If in notebook then display the result using html and pre. Done.

Attachments (2)

sage-2992.patch (3.4 KB) - added by was 11 years ago.
sage-2992-part2.patch (1.7 KB) - added by was 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by was

comment:1 Changed 11 years ago by was

  • Summary changed from notebook -- help(foo) in the notebook should not word wrap to [with patch; needs review] notebook -- help(foo) in the notebook should not word wrap

The attached patch does this:

  1. Wrote new version of help command for the notebook.
  2. Slightly modified how truncation is done to account for 1.	 While I was at	it, I fixed another
     but where reloading a page would put multiple "output truncated" messages at the top of the page.

comment:2 Changed 11 years ago by boothby

  • Summary changed from [with patch; needs review] notebook -- help(foo) in the notebook should not word wrap to [with patch; slightly negative review] notebook -- help(foo) in the notebook should not word wrap

This is ugly -- scroll down:

help(interact)

I don't know if this is worth a fully negative review, but I think this looks like crap. Perhaps a pre tag would make it all better?

Changed 11 years ago by was

comment:3 Changed 11 years ago by was

  • Summary changed from [with patch; slightly negative review] notebook -- help(foo) in the notebook should not word wrap to [with patch; needs review] notebook -- help(foo) in the notebook should not word wrap

I completely rewrote help(...) to address the referee remark and to make help(...) vastly more robust when the output is MASSIVE (which it often is). Try, e.g.,

import numpy
help(numpy)

with the new version, and your browser will *not* get killed. I had my browser crash in class when teaching with the old version.

Of course the issues with help(interact) are also fixed.

Apply both patches, in order.

comment:4 Changed 11 years ago by boothby

Failed to apply :(

comment:5 Changed 11 years ago by boothby

Works for me.

comment:6 Changed 11 years ago by boothby

  • Summary changed from [with patch; needs review] notebook -- help(foo) in the notebook should not word wrap to [with patch; positive review] notebook -- help(foo) in the notebook should not word wrap

comment:7 Changed 11 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged both patches in in Sage 3.0.2.alpha1. The dependecy tree is borked since part 2 depends on #3024 being merged. D'oh

Note: See TracTickets for help on using tickets.