Fredrik Lundh wrote: > 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 ?
In the inputhook one would have to check for "exit" being defined at interpreter level. Reinhold -- Mail address is perfectly valid! _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com