Skip to content

Commit 66f9750

Browse files
cclaussjeffwidman
authored andcommitted
Use print() function in both Python 2 and Python 3
1 parent 7008fd4 commit 66f9750

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

benchmarks/load_example.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python
2+
from __future__ import print_function
23
import threading, logging, time
34

45
from kafka import KafkaConsumer, KafkaProducer
@@ -53,9 +54,9 @@ def main():
5354
time.sleep(10)
5455
producer_stop.set()
5556
consumer_stop.set()
56-
print 'Messages sent: %d' % threads[0].sent
57-
print 'Messages recvd: %d' % threads[1].valid
58-
print 'Messages invalid: %d' % threads[1].invalid
57+
print('Messages sent: %d' % threads[0].sent)
58+
print('Messages recvd: %d' % threads[1].valid)
59+
print('Messages invalid: %d' % threads[1].invalid)
5960

6061
if __name__ == "__main__":
6162
logging.basicConfig(

0 commit comments

Comments
 (0)