summaryrefslogtreecommitdiffstats
path: root/Demo/md5test
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-07-17 20:59:35 (GMT)
committerCollin Winter <collinw@gmail.com>2007-07-17 20:59:35 (GMT)
commit6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch)
tree5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/md5test
parenta8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff)
downloadcpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.zip
cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.gz
cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.bz2
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
Diffstat (limited to 'Demo/md5test')
-rwxr-xr-xDemo/md5test/md5driver.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Demo/md5test/md5driver.py b/Demo/md5test/md5driver.py
index 4c7cfcb..242d0a5 100755
--- a/Demo/md5test/md5driver.py
+++ b/Demo/md5test/md5driver.py
@@ -9,7 +9,7 @@ def MDPrint(str):
outstr = (outstr
+ string.hexdigits[(o >> 4) & 0xF]
+ string.hexdigits[o & 0xF])
- print outstr,
+ print(outstr, end=' ')
from time import time
@@ -39,7 +39,7 @@ def MDTimeTrial():
# start timer
- print 'MD5 time trial. Processing', TEST_BYTES, 'characters...'
+ print('MD5 time trial. Processing', TEST_BYTES, 'characters...')
t1 = time()
mdContext = md5.new()
@@ -51,14 +51,14 @@ def MDTimeTrial():
t2 = time()
MDPrint(str)
- print 'is digest of test input.'
- print 'Seconds to process test input:', t2 - t1
- print 'Characters processed per second:', TEST_BYTES / (t2 - t1)
+ print('is digest of test input.')
+ print('Seconds to process test input:', t2 - t1)
+ print('Characters processed per second:', TEST_BYTES / (t2 - t1))
def MDString(str):
MDPrint(md5.new(str).digest())
- print '"' + str + '"'
+ print('"' + str + '"')
def MDFile(filename):
@@ -72,7 +72,7 @@ def MDFile(filename):
mdContext.update(data)
MDPrint(mdContext.digest())
- print filename
+ print(filename)
import sys
@@ -87,11 +87,11 @@ def MDFilter():
mdContext.update(data)
MDPrint(mdContext.digest())
- print
+ print()
def MDTestSuite():
- print 'MD5 test suite results:'
+ print('MD5 test suite results:')
MDString('')
MDString('a')
MDString('abc')