diff --git a/IPython/history.py b/IPython/history.py index 4b0aa41..7e91a8c 100644 --- a/IPython/history.py +++ b/IPython/history.py @@ -173,9 +173,13 @@ def rep_f(self, arg): return - lines = self.extract_input_slices(args, True) - print "lines",lines - ip.runlines(lines) + try: + lines = self.extract_input_slices(args, True) + print "lines",lines + ip.runlines(lines) + except ValueError: + print "Not found in recent history:", args + _sentinel = object()