Newbie: How to do an exit ?

Jere Kahanpaa jkahanpa at
Fri Apr 7 08:36:43 EDT 2000

Pascal Fremaux <pf at> wrote:
: How to exit from a program ?
: I don't find a command such as exit(0) in C

The 'sys' module has everything you need

   import sys


  from sys import exit

BTW: This is explained in the tutorial in chapter 2.1 (at least in version 1.5.2). Unfortunately 
the standard Python tutorial is not very user-friendly: it doesn't have any index or searching
tools. Personally used to do a lot or grepping around until I found the clues I needed. 

Happy hacking
	Jere Kahanpää

More information about the Python-list mailing list