changeset 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 388ae061c915
children 98bccf81db4d
files upreckon-vcs win32.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/upreckon-vcs	Tue May 24 22:46:30 2011 +0100
+++ b/upreckon-vcs	Tue May 24 23:53:43 2011 +0100
@@ -131,6 +131,7 @@
 		say('Grand total: %g/%g weighted points; %d/%d problems solved fully' % (realscore, maxscore, nfulltasks, ntasks))
 except KeyboardInterrupt:
 	say('Exiting due to a keyboard interrupt.', end='', file=sys.stderr)
+	sys.stderr.flush()
 	try:
 		import os, signal
 		signal.signal(signal.SIGINT, signal.SIG_DFL)
--- a/win32.py	Tue May 24 22:46:30 2011 +0100
+++ b/win32.py	Tue May 24 23:53:43 2011 +0100
@@ -8,7 +8,7 @@
 from ctypes import *
 from ctypes.wintypes import *
 from msvcrt import getch as pause
-import os, subprocess, sys
+import os, subprocess, sys, time
 
 try:
 	from _winreg import *