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

Alan Gauld alan.gauld at
Mon Feb 23 23:42:12 CET 2004

On Mon, 23 Feb 2004 15:12:59 -0500, "Mike Maxwell"
<maxwell at> wrote:

> The additional reason is that God intended Ctrl-D to be "scroll down", as in
> vi.  

Sorry God had decided that Ctrl-D was EOF long before vi was even
a bit pattern in Bill Joy's eye.

And of course if you are on the spawn of Satan, EOF is CTRL-Z and
thats how you exit Python...

> use to drop out.  But if you're using the command-line version (e.g. the one
> in CygWin) from a shell prompt, then you're out of luck.

raise SystemExit

A wee bit longwinded I'll grant you, but it does the trick...

Alan G.
Author of the Learn to Program website

More information about the Python-list mailing list