Exiting python to the DOS shell in 2.3

S

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?

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

-- Stephen
 
A

Alan Kennedy

[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.
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top