'Banner for IPython widgets with pylab message'

def long_banner(self):

    try:
        from IPython.core.usage import quick_guide
    except Exception:
        quick_guide = ''
    banner_parts = [('Python    %s\n' % self.interpreter_versions['python_version']), 'Type    "copyright",    "credits"    or    "license"    for    more    information.\n\n', ('IPython    %s    --    An    enhanced    Interactive    Python.\n' % self.interpreter_versions['ipython_version']), quick_guide]
    banner = ''.join(banner_parts)
    pylab_o = self.additional_options['pylab']
    autoload_pylab_o = self.additional_options['autoload_pylab']
    mpl_installed = programs.is_module_installed('matplotlib')
    if (mpl_installed and (pylab_o and autoload_pylab_o)):
        pylab_message = '\nPopulating    the    interactive    namespace    from    numpy    and    matplotlib\n'
        banner = (banner + pylab_message)
    sympy_o = self.additional_options['sympy']
    if sympy_o:
        lines = "\nThese    commands    were    executed:\n>>>    from    __future__    import    division\n>>>    from    sympy    import    *\n>>>    x,    y,    z,    t    =    symbols('x    y    z    t')\n>>>    k,    m,    n    =    symbols('k    m    n',    integer=True)\n>>>    f,    g,    h    =    symbols('f    g    h',    cls=Function)\n"
        banner = (banner + lines)
    if (pylab_o and sympy_o):
        lines = '\nWarning:    pylab    (numpy    and    matplotlib)    and    symbolic    math    (sympy)    are    both    \nenabled    at    the    same    time.    Some    pylab    functions    are    going    to    be    overrided    by    \nthe    sympy    module    (e.g.    plot)\n'
        banner = (banner + lines)
    return banner
