Message30642
When i type 'quit' in the interpreter, i get a nice little class and method yelling at me, instead of just quitting.
PATCH:
<pre>
def setquit():
class Quitter(object):
def __init__(self, name):
self.name = name
def __repr__(self):
quit()
def __call__(self, code=None):
# Shells like IDLE catch the SystemExit, but listen when their
# stdin wrapper is closed.
try:
sys.stdin.close()
except:
pass
raise SystemExit(code)
__builtin__.quit = Quitter('quit')
__builtin__.exit = Quitter('exit')
</pre> |
|
Date |
User |
Action |
Args |
2007-08-23 14:50:11 | admin | link | issue1600157 messages |
2007-08-23 14:50:11 | admin | create | |
|