summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clauss <cclauss@me.com>2020-01-10 09:00:04 +0100
committerJeff Widman <jeff@jeffwidman.com>2020-02-05 15:26:09 -0800
commit66f9750e0fc5617ebc38a76144aa49d94b442f35 (patch)
tree15a9f6329bdd4ead964254a1cf7f91acf7e60453
parent7008fd44f545f0794030dc73d9e1d3115ec9e88d (diff)
downloadkafka-python-66f9750e0fc5617ebc38a76144aa49d94b442f35.tar.gz
Use print() function in both Python 2 and Python 3
-rwxr-xr-xbenchmarks/load_example.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/benchmarks/load_example.py b/benchmarks/load_example.py
index a3b09ba..eef113e 100755
--- a/benchmarks/load_example.py
+++ b/benchmarks/load_example.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from __future__ import print_function
import threading, logging, time
from kafka import KafkaConsumer, KafkaProducer
@@ -53,9 +54,9 @@ def main():
time.sleep(10)
producer_stop.set()
consumer_stop.set()
- print 'Messages sent: %d' % threads[0].sent
- print 'Messages recvd: %d' % threads[1].valid
- print 'Messages invalid: %d' % threads[1].invalid
+ print('Messages sent: %d' % threads[0].sent)
+ print('Messages recvd: %d' % threads[1].valid)
+ print('Messages invalid: %d' % threads[1].invalid)
if __name__ == "__main__":
logging.basicConfig(