Ticket #3685: trac_3685.patch

File trac_3685.patch, 1.9 KB (added by mhansen, 7 years ago)
  • sage/all.py

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1374502914 -3600
    # Node ID 7b5aa9c036688b40d43f2f80b625011ca52433b8
    # Parent  f704d2add779314c4d502deae60b4230f19c7258
    #3685: make sure that import
    
    diff --git a/sage/all.py b/sage/all.py
    a b  
    3535        ....:     else:
    3636        ....:         print filename
    3737        ....:
     38
     39    Check that IPython is *not* imported by default when sage.all is imported::
     40
     41        sage: os.system('sage -startuptime|grep IPython')
     42        256
    3843"""
    3944
    4045###############################################################################
  • sage/misc/all.py

    diff --git a/sage/misc/all.py b/sage/misc/all.py
    a b  
    6767
    6868from preparser import preparse, implicit_multiplication, BackslashOperator, attached_files, detach, load_attach_path, reset_load_attach_path, load_attach_mode
    6969
    70 from interpreter import preparser
     70from sage.misc.lazy_import import lazy_import
     71lazy_import("sage.misc.interpreter", ["preparser"])
    7172
    7273from sage_eval import sage_eval, sageobj
    7374
  • sage/misc/log.py

    diff --git a/sage/misc/log.py b/sage/misc/log.py
    a b  
    6161import os
    6262import time
    6363
    64 import interpreter
    6564import latex
    6665import misc
    6766
     
    245244        return "HTML Logger"
    246245
    247246    def _get_input(self, n, followed_by_output):
     247        import interpreter
    248248        if n >= len(self._input):
    249249            return
    250250        return """<font color=darkblue>     %s %s:</font> %s"""%(
     
    348348        os.system(cmd + " 2>/dev/null 1>/dev/null &")
    349349
    350350    def _get_input(self, n, followed_by_output):
     351        import interpreter
    351352        if n >= len(self._input):
    352353            return
    353354        s = ''
     
    444445        os.system(cmd + " 2>/dev/null 1>/dev/null &")
    445446
    446447    def _get_input(self, n, followed_by_output):
     448        import interpreter
    447449        if n >= len(self._input):
    448450            return
    449451        else: