Ticket #12719: 12719_ipython_no_history.patch

File 12719_ipython_no_history.patch, 1.2 KB (added by jdemeyer, 8 years ago)
  • sage/interfaces/sage0.py

    # HG changeset patch
    # User Sage Buildbot
    # Date 1359124824 28800
    # Node ID adaa97e250b59440593564991238af055df8d006
    # Parent  ff4af82ac2bb3a76774f46859308e7c6c12738c5
    Disable IPython history in sage0 interface
    
    diff --git a/sage/interfaces/sage0.py b/sage/interfaces/sage0.py
    a b class Sage(Expect): 
    138138            True
    139139        """
    140140        if python:
    141             if server:
    142                 command = "sage -python -u"
    143             else:
    144                 command = "sage -python -u"
     141            command = "python -u"
    145142            prompt = ">>>"
    146143            if init_code is None:
    147144                init_code = ['from sage.all import *', 'import cPickle']
    148145        else:
    149             command = "sage"
     146            # Disable the IPython history (implemented as SQLite database)
     147            # to avoid problems with locking.
     148            command = "sage-ipython --HistoryManager.hist_file=:memory:"
    150149            prompt = "sage: "
    151150            if init_code is None:
    152151                init_code = ['import cPickle', '%colors NoColor']
    153        
     152
    154153        Expect.__init__(self,
    155154                        name = 'sage',
    156155                        prompt = prompt,