Newbie: How to do an exit ?

Nick Maclaren nmm1 at cus.cam.ac.uk
Fri Apr 7 08:20:45 EDT 2000


In article <38EDC1DA.62CBFCF3 at sxb.bsf.alcatel.fr>, Pascal Fremaux <pf at sxb.bsf.alcatel.fr> writes:
|> How to exit from a program ?
|> I don't find a command such as exit(0) in C

Try one of:

    raise SystemExit(0)

    import sys
    sys.exit(0)

    from sys import exit
    exit(0)


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679



More information about the Python-list mailing list