Newbie: How to do an exit ?

Oleg Broytmann phd at phd.russ.ru
Fri Apr 7 08:23:34 EDT 2000


On Fri, 7 Apr 2000, Pascal Fremaux wrote:
> How to exit from a program ?
> I don't find a command such as exit(0) in C

import sys
sys.exit(0)

   Or

raise SystemExit, 0

   If you need _exit(1) it is

import os
os._exit(1)

Oleg.            (All opinions are mine and not of my employer)
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list