Ticket #14559: trac_14559_fancy_sage_banner-tm.patch

File trac_14559_fancy_sage_banner-tm.patch, 1.7 KB (added by tmonteil, 9 years ago)

New version, modifying sage/misc/banner.py

  • sage/misc/banner.py

    # HG changeset patch
    # User Thierry Monteil <sage at lma.metelu.net>
    # Date 1368115179 -7200
    # Node ID f96088c9c7dabb88e0712800c9ec131e14f14cd9
    # Parent  c8ae9724d3cfad1837a130d50ac5c83a811ec221
    #14559: Make sage-banner more pretty
    
    diff --git a/sage/misc/banner.py b/sage/misc/banner.py
    a b def banner_text(): 
    5353    EXAMPLES::
    5454
    5555        sage: print sage.misc.banner.banner_text()
    56         ----------------------------------------------------------------------
     56        +--------------------------------------------------------------------+
    5757        | Sage Version ...
    5858    """
    59     bars = "-"*70
     59    bars = '+' + "-"*68 + '+'
    6060    s = bars
    6161    s += "\n| %-66s |\n"%version()
    6262    s += "| %-66s |\n"%'Type "notebook()" for the browser-based notebook interface.'
    def banner_text(): 
    6666    pre = version_dict()['prerelease']
    6767    if pre:
    6868        s += '\n'
    69         s += bars.replace('-', '*')
     69        s += bars.replace('-', '*').replace('+','*')
    7070        s += "\n* %-66s *\n"%''
    7171        s += "* %-66s *\n"%'Warning: this is a prerelease version, and it may be unstable.'
    7272        s += "* %-66s *\n"%''
    73         s += bars.replace('-', '*')
     73        s += bars.replace('-', '*').replace('+','*')
    7474    return s
    7575   
    7676
    def banner(): 
    8989    EXAMPLES::
    9090
    9191        sage: banner()
    92         ----------------------------------------------------------------------
     92        +--------------------------------------------------------------------+
    9393        | Sage Version ..., Release Date: ...
    9494        | Type "notebook()" for the browser-based notebook interface.        |
    9595        | Type "help()" for help.                                            |