Terminating Python...

Sebastien Tanguy sebastien.tanguy at wanadoo.fr
Thu Jul 15 17:01:57 EDT 1999


>>>>> "AF" == Alex Flinsch <aflinsch at njeb.att.com> writes:

AF> Fredrik Lundh wrote:

>> in which way is typing "raise SystemExit<Return>" better
>> than typing "<Control-D>" (which is documented in the
>> Python Tutorial) ?
>> 

AF> "raise SystemExit" could be embedded in some python code, while a
AF> <Control-D> could not be.  "raise SystemExit" would work on any
AF> OS, no need to check if we are running windows or something else.

and what about :

import sys
sys.exit(0)

Doesn't it work on every platform ?

greetings,
seb.
-- 
<<"regression testing" ? What's that ? If it compiles, it is good, 
  if it boots up it is perfect.>>		(Linus T.)




More information about the Python-list mailing list