python 2 & 3 compatibility
diff --git a/tools/pidpersec b/tools/pidpersec
index b4a7ffb..6a3ca8c 100755
--- a/tools/pidpersec
+++ b/tools/pidpersec
@@ -25,7 +25,7 @@
S_COUNT = 1
# header
-print "Tracing... Ctrl-C to end."
+print("Tracing... Ctrl-C to end.")
# output
last = 0
@@ -35,6 +35,6 @@
except KeyboardInterrupt:
pass; exit()
- print "%s: PIDs/sec: %d" % (strftime("%H:%M:%S"),
- (stats[c_int(S_COUNT)].value - last))
+ print("%s: PIDs/sec: %d" % (strftime("%H:%M:%S"),
+ (stats[c_int(S_COUNT)].value - last)))
last = stats[c_int(S_COUNT)].value