##// END OF EJS Templates
Suppress auto_rewrite of exit autocall.
Thomas Kluyver -
Show More
@@ -36,6 +36,7 b' class IPyAutocall(object):'
36 36 develop macro-like mechanisms.
37 37 """
38 38 _ip = None
39 rewrite = True
39 40 def __init__(self, ip=None):
40 41 self._ip = ip
41 42
@@ -51,6 +52,7 b' class IPyAutocall(object):'
51 52 class ExitAutocall(IPyAutocall):
52 53 """An autocallable object which will be added to the user namespace so that
53 54 exit, exit(), quit or quit() are all valid ways to close the shell."""
55 rewrite = False
54 56
55 57 def __call__(self):
56 58 self._ip.ask_exit()
@@ -894,7 +894,7 b' class AutoHandler(PrefilterHandler):'
894 894 return line
895 895
896 896 force_auto = isinstance(obj, IPyAutocall)
897 auto_rewrite = True
897 auto_rewrite = getattr(obj, 'rewrite', True)
898 898
899 899 if pre == ESC_QUOTE:
900 900 # Auto-quote splitting on whitespace
General Comments 0
You need to be logged in to leave comments. Login now