##// END OF EJS Templates
inoculate %clear magic from quarantine
Paul Ivanov -
Show More
@@ -30,7 +30,7 b' def clear_f(self,arg):'
30 30 Clearing directory history
31 31 """
32 32
33 api = self.getapi()
33 api = self.get_ipython()
34 34 user_ns = self.user_ns # local lookup, heavily used
35 35
36 36
@@ -38,11 +38,11 b' def clear_f(self,arg):'
38 38
39 39 if target == 'out':
40 40 print "Flushing output cache (%d entries)" % len(user_ns['_oh'])
41 self.outputcache.flush()
41 self.displayhook.flush()
42 42
43 43 elif target == 'in':
44 44 print "Flushing input history"
45 pc = self.outputcache.prompt_count + 1
45 pc = self.displayhook.prompt_count + 1
46 46 for n in range(1, pc):
47 47 key = '_i'+`n`
48 48 user_ns.pop(key,None)
@@ -82,6 +82,5 b' def clear_f(self,arg):'
82 82
83 83 # Activate the extension
84 84 ip.define_magic("clear",clear_f)
85 import ipy_completers
86 ipy_completers.quick_completer(
87 '%clear','in out shadow_nuke shadow_compress dhist')
85 from IPython.core.completerlib import quick_completer
86 quick_completer( '%clear','in out shadow_nuke shadow_compress dhist')
General Comments 0
You need to be logged in to leave comments. Login now