comparison upreckon-vcs @ 141:dfde0f5e0984

A couple of Win32 fixes Bug fix: win32.kill() no longer raises a fatal NameError. Bug fix: stderr is now flushed when exiting due to a keyboard interrupt.
author Oleg Oshmyan <chortos@inbox.lv>
date Tue, 24 May 2011 23:53:43 +0100
parents 517dd43f06f8
children
comparison
equal deleted inserted replaced
140:388ae061c915 141:dfde0f5e0984
129 if ntasks != 1: 129 if ntasks != 1:
130 say() 130 say()
131 say('Grand total: %g/%g weighted points; %d/%d problems solved fully' % (realscore, maxscore, nfulltasks, ntasks)) 131 say('Grand total: %g/%g weighted points; %d/%d problems solved fully' % (realscore, maxscore, nfulltasks, ntasks))
132 except KeyboardInterrupt: 132 except KeyboardInterrupt:
133 say('Exiting due to a keyboard interrupt.', end='', file=sys.stderr) 133 say('Exiting due to a keyboard interrupt.', end='', file=sys.stderr)
134 sys.stderr.flush()
134 try: 135 try:
135 import os, signal 136 import os, signal
136 signal.signal(signal.SIGINT, signal.SIG_DFL) 137 signal.signal(signal.SIGINT, signal.SIG_DFL)
137 os.kill(os.getpid(), signal.SIGINT) 138 os.kill(os.getpid(), signal.SIGINT)
138 except Exception: 139 except Exception: