Ticket #12719: trac_12719-pager.patch

File trac_12719-pager.patch, 1.7 KB (added by jhpalmieri, 9 years ago)
  • sage/interfaces/gap3.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1351007374 25200
    # Node ID e330c236ceb957fa7086971c504203dd94d04620
    # Parent  c7a42ae1f45e09aa170675064b5775ebd51b8138
    The pager in IPython has moved.
    
    diff --git a/sage/interfaces/gap3.py b/sage/interfaces/gap3.py
    a b class Gap3(Gap_generic): 
    490490        # merge the help text into one string and print it.
    491491        helptext = "".join(helptext).strip()
    492492        if pager is True:
    493             import IPython.genutils
    494             IPython.genutils.page(helptext)
     493            import sage.misc.pager
     494            pager.pager()(helptext)
    495495        else:
    496496            print helptext
    497497
  • sage/misc/pager.py

    diff --git a/sage/misc/pager.py b/sage/misc/pager.py
    a b def pager(): 
    2424    if EMBEDDED_MODE:
    2525        return cat
    2626    else:
    27         import IPython.genutils
    28         return IPython.genutils.page
     27        import IPython.core.page
     28        return IPython.core.page.page
  • sage/misc/sagedoc.py

    diff --git a/sage/misc/sagedoc.py b/sage/misc/sagedoc.py
    a b You can build this with 'sage -docbuild  
    827827                          extra2, extra3, extra4, extra5] if s])
    828828        print format_search_as_html(title, results, terms)
    829829    else:
    830         # hard-code a 25-line screen into the pager; this works around a
    831         # problem with doctests: see
    832         # http://trac.sagemath.org/sage_trac/ticket/5806#comment:11
    833         from IPython.genutils import page
    834         page(results, screen_lines = 25)
     830        import pager
     831        pager.pager()(results)
    835832
    836833
    837834def search_src(string, extra1='', extra2='', extra3='', extra4='',