exception KeyboardInterrupt and os.system command

malv malvert at telenet.be
Mon Nov 28 04:04:34 EST 2005


That's also kind of what I expected.
However, I quickly tried:
import os
while 1:
     y = os.system("sleep 1")
     z = (y >> 8) & 0xFF
     print z

I never get anything in return but 0, hitting c-C or not.
I have uset the above code to get exit code returns in the past though.
Would there be anything special with sleep?

Regards,
malv




More information about the Python-list mailing list