diff --git a/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py b/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
index 7d5d231..5c8f409 100644
--- a/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
+++ b/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python 
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +19,7 @@
 # under the License.
 #
 
+from __future__ import print_function
 import sys
 import os
 from optparse import OptionParser
@@ -57,24 +58,20 @@
             msg = fb_status_string(status)
             if (len(status_details)):
                 msg += " - %s" % status_details
-            print msg
-
-            if (status == fb_status.ALIVE):
-                return 2
-            else:
-                return 3
+            print(msg)
+            return 2 if status == fb_status.ALIVE else 3
         except:
-            print "Failed to get status"
+            print("Failed to get status")
             return 3
 
     # scalar commands
     if command in ["version", "alive", "name"]:
         try:
             result = fb303_wrapper(command, port, trans_factory, prot_factory)
-            print result
+            print(result)
             return 0
         except:
-            print "failed to get ", command
+            print("failed to get ", command)
             return 3
 
     # counters
@@ -82,10 +79,10 @@
         try:
             counters = fb303_wrapper('counters', port, trans_factory, prot_factory)
             for counter in counters:
-                print "%s: %d" % (counter.encode('utf-8'), counters[counter])
+                print("%s: %d" % (counter.encode('utf-8'), counters[counter]))
             return 0
         except:
-            print "failed to get counters"
+            print("failed to get counters")
             return 3
 
     # Only root should be able to run the following commands
@@ -96,19 +93,19 @@
                 fb303_wrapper(command, port, trans_factory, prot_factory)
                 return 0
             except:
-                print "failed to tell the service to ", command
+                print("failed to tell the service to ", command)
                 return 3
     else:
         if command in ["stop", "reload"]:
-            print "root privileges are required to stop or reload the service."
+            print("root privileges are required to stop or reload the service.")
             return 4
 
-    print "The following commands are available:"
+    print("The following commands are available:")
     for command in ["counters", "name", "version", "alive", "status"]:
-        print "\t%s" % command
-    print "The following commands are available for users with root privileges:"
+        print("\t%s" % command)
+    print("The following commands are available for users with root privileges:")
     for command in ["stop", "reload"]:
-        print "\t%s" % command
+        print("\t%s" % command)
 
     return 0
 
diff --git a/contrib/zeromq/test-client.py b/contrib/zeromq/test-client.py
index 753b132..55c23e0 100755
--- a/contrib/zeromq/test-client.py
+++ b/contrib/zeromq/test-client.py
@@ -29,7 +29,7 @@
         time.sleep(0.05)
     else:
         value = client.get()
-        print value
+        print(value)
 
 
 if __name__ == "__main__":
