Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Exiting python to the DOS shell in 2.3

Reply
Thread Tools

Exiting python to the DOS shell in 2.3

 
 
Stephen Boulet
Guest
Posts: n/a
 
      08-18-2003
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

 
Reply With Quote
 
 
 
 
Alan Kennedy
Guest
Posts: n/a
 
      08-18-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exiting from python shell Tobiah Python 2 07-18-2007 11:37 PM
[newbie]How to install python under DOS and is there any Wxpython can be installed under dos? john san Python 19 02-18-2005 12:05 PM
Using Python instead of DOS shell scripts Jeff Wagner Python 9 09-22-2004 04:02 AM
exiting Dos program hangs windows fhg A+ Certification 3 01-22-2004 09:16 PM
Executing DOS (yes, DOS) program from within Python? Ben Fairbank Python 2 10-07-2003 08:51 AM



Advertisments