--- a/tests/md5sum.py Sun Oct 12 19:11:56 2008 +0200
+++ b/tests/md5sum.py Sun Oct 12 19:11:59 2008 +0200
@@ -6,13 +6,20 @@
# of the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2, which is
# GPL-compatible.
-import sys
+import sys, os
try:
from hashlib import md5
except ImportError:
from md5 import md5
+try:
+ import msvcrt
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
+ msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
+except ImportError:
+ pass
+
for filename in sys.argv[1:]:
try:
fp = open(filename, 'rb')