Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
diff --git a/Demo/sockets/throughput.py b/Demo/sockets/throughput.py
index b8df1f3..64244aa 100755
--- a/Demo/sockets/throughput.py
+++ b/Demo/sockets/throughput.py
@@ -33,8 +33,8 @@
def usage():
sys.stdout = sys.stderr
- print 'Usage: (on host_A) throughput -s [port]'
- print 'and then: (on host_B) throughput -c count host_A [port]'
+ print('Usage: (on host_A) throughput -s [port]')
+ print('and then: (on host_B) throughput -c count host_A [port]')
sys.exit(2)
@@ -46,7 +46,7 @@
s = socket(AF_INET, SOCK_STREAM)
s.bind(('', port))
s.listen(1)
- print 'Server ready...'
+ print('Server ready...')
while 1:
conn, (host, remoteport) = s.accept()
while 1:
@@ -56,7 +56,7 @@
del data
conn.send('OK\n')
conn.close()
- print 'Done with', host, 'port', remoteport
+ print('Done with', host, 'port', remoteport)
def client():
@@ -82,12 +82,12 @@
t4 = time.time()
data = s.recv(BUFSIZE)
t5 = time.time()
- print data
- print 'Raw timers:', t1, t2, t3, t4, t5
- print 'Intervals:', t2-t1, t3-t2, t4-t3, t5-t4
- print 'Total:', t5-t1
- print 'Throughput:', round((BUFSIZE*count*0.001) / (t5-t1), 3),
- print 'K/sec.'
+ print(data)
+ print('Raw timers:', t1, t2, t3, t4, t5)
+ print('Intervals:', t2-t1, t3-t2, t4-t3, t5-t4)
+ print('Total:', t5-t1)
+ print('Throughput:', round((BUFSIZE*count*0.001) / (t5-t1), 3), end=' ')
+ print('K/sec.')
main()