[Python-Dev] a quit that actually quits (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Wed Dec 28 19:19:44 CET 2005
- Previous message: [Python-Dev] a quit that actually quits
- Next message: [Python-Dev] a quit that actually quits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Walter Dörwald wrote:
We have sys.displayhook and sys.excepthook. Why not add a sys.inputhook? sys.inputhook gets passed each line entered and may return True if it has processed the line inself and False if normal handling of the input should be done. This allows special treatment of "quit", "exit", "help" /.../
so how would such a hook deal with the
>>> def exit():
... pass
>>> exit
case ?
- Previous message: [Python-Dev] a quit that actually quits
- Next message: [Python-Dev] a quit that actually quits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]