Exiting python to the DOS shell in 2.3

Alan Kennedy alanmk at hotmail.com
Mon Aug 18 11:14:42 EDT 2003


[Stephen Boulet]
> Control-C doesn't get me back to the DOS prompt anymore in python 2.3.
> Aside from typing "import sys" and "sys.exit()", is there a key
> combination to quit python?

The EOF character should do the job on any platform. On Windows/DOS,
the EOF character is ctrl-Z, on *nix it's ctrl-D. Here is a transcript
of a (brief) python session on win2K:

C:\>python
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z
C:\>

> BTW, the "enumerate" function is the best thing since sliced bread.

IMHO, generators, i.e. resumable functions, are the best thing since
sliced bread ;-) but enumerate is pretty useful too.

regards,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list