Permalink
Browse files

Cleanup old calls to save_history and reload_history methods, which w…

…ere removed.

Closes gh-318
  • Loading branch information...
1 parent 2b37a36 commit 7df96761a87e745ebe4287a127a589987be4f9bc @takluyver takluyver committed Mar 27, 2011
Showing with 2 additions and 26 deletions.
  1. +2 −22 IPython/core/interactiveshell.py
  2. +0 −4 IPython/core/magic.py
@@ -737,7 +737,7 @@ def debugger(self,force=False):
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 @@ def init_history(self):
"""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 @@ def safe_execfile_ipy(self, fname):
# 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)
@@ -1602,8 +1602,6 @@ def magic_run(self, parameter_s ='',runner=None,
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 @@ def magic_run(self, parameter_s ='',runner=None,
# added. Otherwise it will trap references to objects
# contained therein.
del sys.modules[main_mod_name]
-
- #self.shell.reload_history()
return stats

0 comments on commit 7df9676

Please sign in to comment.