Neil Schemenauer wrote:
> Scott David Daniels <[EMAIL PROTECTED]> wrote:
>> Or, perhaps:
>>      class _Quitter(str):
>>          def __call__(self): raise SystemExit
>>      quit = _Quitter('The quit command.  Type "quit()" to exit')
>>      exit = _Quitter('The exit command.  Type "exit()" to exit')
> 
> FWIW, I like this kind of solution best.  Something magical would be
> a mistake.  I don't like the status quo because there is no
> cross-plaform way to indicate EOF (or more pedantically "push
> current line").  Maybe we can make everyone happy by making the
> 'quit' and 'exit' objects callable and changing the message to
> something like:
> 
>     Use quit() or Ctrl-D (i.e. EOF) to exit.
> 
> Cheers,

This sounds pretty good actually (especially combined with the modifed startup 
banner which tells you how to exit).

As Fernando pointed out, anything else means we'd be well on our way to 
re-inventing IPython (although I'd be interested to know if sys.inputhook 
would have made IPython easier to write).

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
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

Reply via email to