Why sys.exit does not exit ?
Giorge
me at nospam.pls
Thu Mar 13 09:47:50 EST 2003
Hi all, here is a small code snippet that should
tell something about what I'm trying to do:
import sys, os, thread, time
from threading import *
def quit ():
print "10 seconds passed. We should exit right now !"
sys.exit(0)
# main program:
t = Timer (10.0, quit )
t.start()
sleep(20)
The problem here is that the sys.exit call doesn't
terminate the program, which exits after the sleep
call.
Can you help ? thanks.
More information about the Python-list
mailing list