Opened 11 years ago

Last modified 5 years ago

#3434 new enhancement

notebook -- implementin MAX_OUTPUT handling in cell.py for interact.

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

Description

Try this in the notebook

@interact
def test(a=1):
    print 2^a

For large a it outputs something massive and very very bad. This should not be aloud.

To fix this:

  1. Look at
                self.interact = input[len('%__sage_interact__')+1]
    

in cell.py

  1. Factor out this code from cell.py:
            if 'notruncate' not in output and 'Output truncated!' not in output and \
                  (len(output) > MAX_OUTPUT or output.count('\n') > MAX_OUTPUT_LINES) and \
    

Change History (5)

comment:1 Changed 11 years ago by AlexGhitza

  • Type changed from defect to enhancement

comment:2 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:4 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:5 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.