diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 7e91912..a0b55e5 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -737,7 +737,7 @@ class InteractiveShell(Configurable, Magic): else: # fallback to our internal debugger pm = lambda : self.InteractiveTB.debugger(force=True) - self.history_saving_wrapper(pm)() + pm() #------------------------------------------------------------------------- # Things related to IPython's various namespaces @@ -1250,26 +1250,6 @@ class InteractiveShell(Configurable, Magic): """Sets up the command history, and starts regular autosaves.""" self.history_manager = HistoryManager(shell=self, config=self.config) - def history_saving_wrapper(self, func): - """ Wrap func for readline history saving - - Convert func into callable that saves & restores - history around the call """ - - if self.has_readline: - from IPython.utils import rlineimpl as readline - else: - return func - - def wrapper(): - self.save_history() - try: - func() - finally: - self.reload_history() - return wrapper - - #------------------------------------------------------------------------- # Things related to exception handling and tracebacks (not debugging) #------------------------------------------------------------------------- @@ -2062,7 +2042,7 @@ class InteractiveShell(Configurable, Magic): # raised in user code. It would be nice if there were # versions of runlines, execfile that did raise, so # we could catch the errors. - self.run_cell(thefile.read()) + self.run_cell(thefile.read(), store_history=False) except: self.showtraceback() warn('Unknown failure executing file: <%s>' % fname) diff --git a/IPython/core/magic.py b/IPython/core/magic.py index 3e8d117..a571e49 100644 --- a/IPython/core/magic.py +++ b/IPython/core/magic.py @@ -1602,8 +1602,6 @@ Currently the magic system has the following functions:\n""" stats = None try: - #self.shell.save_history() - if opts.has_key('p'): stats = self.magic_prun('',0,opts,arg_lst,prog_ns) else: @@ -1720,8 +1718,6 @@ Currently the magic system has the following functions:\n""" # added. Otherwise it will trap references to objects # contained therein. del sys.modules[main_mod_name] - - #self.shell.reload_history() return stats