Gripe: Use Ctrl-D (i.e. EOF) to exit

Gerrit gerrit at nl.linux.org
Mon Feb 23 15:20:57 EST 2004


Mike Maxwell wrote:
> <vent> I see there has been traffic over the years on this gripe, so just
> let me vent my frustration, and add another reason why 'exit' (or possibly
> exit() or quit() or halt() or some such) should exit Python, rather than
> giving the ridiculous msg

> Why isn't there a command or function to drop out of Python??!!  Obviously
> Python is clever enough to know that you want to exit when you type 'exit';
> why does it make you stand on your head to do so?

You can put in your .pythonrc:

from sys import exit

It helps!

Gerrit.

-- 
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/




More information about the Python-list mailing list