diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index bcef7ee..60d1bf4 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -19,6 +19,7 @@
 # You should have received a copy of the GNU General Public License along
 # with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import print_function
 import argparse
 import json
 import sys
@@ -176,10 +177,10 @@
             except StopIteration:
                 if d_iter_list == []:
                     # We were not in a substruct
-                    print "Section \"" + sec + "\",",
-                    print "Description " + "\"" + desc + "\":",
-                    print "expected field \"" + s_item["field"] + "\",",
-                    print "while dest has no further fields"
+                    print("Section \"" + sec + "\",", end=' ')
+                    print("Description " + "\"" + desc + "\":", end=' ')
+                    print("expected field \"" + s_item["field"] + "\",", end=' ')
+                    print("while dest has no further fields")
                     bump_taint()
                     break
 
@@ -197,10 +198,10 @@
                     advance_dest = True
                     continue
                 if unused_count < 0:
-                    print "Section \"" + sec + "\",",
-                    print "Description \"" + desc + "\":",
-                    print "unused size mismatch near \"",
-                    print s_item["field"] + "\""
+                    print("Section \"" + sec + "\",", end=' ')
+                    print("Description \"" + desc + "\":", end=' ')
+                    print("unused size mismatch near \"", end=' ')
+                    print(s_item["field"] + "\"")
                     bump_taint()
                     break
                 continue
@@ -211,10 +212,10 @@
                     advance_src = True
                     continue
                 if unused_count < 0:
-                    print "Section \"" + sec + "\",",
-                    print "Description \"" + desc + "\":",
-                    print "unused size mismatch near \"",
-                    print d_item["field"] + "\""
+                    print("Section \"" + sec + "\",", end=' ')
+                    print("Description \"" + desc + "\":", end=' ')
+                    print("unused size mismatch near \"", end=' ')
+                    print(d_item["field"] + "\"")
                     bump_taint()
                     break
                 continue
@@ -262,10 +263,10 @@
                     unused_count = s_item["size"] - d_item["size"]
                     continue
 
-            print "Section \"" + sec + "\",",
-            print "Description \"" + desc + "\":",
-            print "expected field \"" + s_item["field"] + "\",",
-            print "got \"" + d_item["field"] + "\"; skipping rest"
+            print("Section \"" + sec + "\",", end=' ')
+            print("Description \"" + desc + "\":", end=' ')
+            print("expected field \"" + s_item["field"] + "\",", end=' ')
+            print("got \"" + d_item["field"] + "\"; skipping rest")
             bump_taint()
             break
 
@@ -289,8 +290,8 @@
             check_descriptions(s_item, d_item, sec)
 
         if not found:
-            print "Section \"" + sec + "\", Description \"" + desc + "\":",
-            print "Subsection \"" + s_item["name"] + "\" not found"
+            print("Section \"" + sec + "\", Description \"" + desc + "\":", end=' ')
+            print("Subsection \"" + s_item["name"] + "\" not found")
             bump_taint()
 
 
@@ -299,8 +300,8 @@
         return
 
     if not "Description" in d_item:
-        print "Section \"" + sec + "\", Description \"" + desc + "\",",
-        print "Field \"" + s_item["field"] + "\": missing description"
+        print("Section \"" + sec + "\", Description \"" + desc + "\",", end=' ')
+        print("Field \"" + s_item["field"] + "\": missing description")
         bump_taint()
         return
 
@@ -311,17 +312,17 @@
     check_version(src_desc, dest_desc, sec, src_desc["name"])
 
     if not check_fields_match(sec, src_desc["name"], dest_desc["name"]):
-        print "Section \"" + sec + "\":",
-        print "Description \"" + src_desc["name"] + "\"",
-        print "missing, got \"" + dest_desc["name"] + "\" instead; skipping"
+        print("Section \"" + sec + "\":", end=' ')
+        print("Description \"" + src_desc["name"] + "\"", end=' ')
+        print("missing, got \"" + dest_desc["name"] + "\" instead; skipping")
         bump_taint()
         return
 
     for f in src_desc:
         if not f in dest_desc:
-            print "Section \"" + sec + "\"",
-            print "Description \"" + src_desc["name"] + "\":",
-            print "Entry \"" + f + "\" missing"
+            print("Section \"" + sec + "\"", end=' ')
+            print("Description \"" + src_desc["name"] + "\":", end=' ')
+            print("Entry \"" + f + "\" missing")
             bump_taint()
             continue
 
@@ -334,39 +335,39 @@
 
 def check_version(s, d, sec, desc=None):
     if s["version_id"] > d["version_id"]:
-        print "Section \"" + sec + "\"",
+        print("Section \"" + sec + "\"", end=' ')
         if desc:
-            print "Description \"" + desc + "\":",
-        print "version error:", s["version_id"], ">", d["version_id"]
+            print("Description \"" + desc + "\":", end=' ')
+        print("version error:", s["version_id"], ">", d["version_id"])
         bump_taint()
 
     if not "minimum_version_id" in d:
         return
 
     if s["version_id"] < d["minimum_version_id"]:
-        print "Section \"" + sec + "\"",
+        print("Section \"" + sec + "\"", end=' ')
         if desc:
-            print "Description \"" + desc + "\":",
-            print "minimum version error:", s["version_id"], "<",
-            print d["minimum_version_id"]
+            print("Description \"" + desc + "\":", end=' ')
+            print("minimum version error:", s["version_id"], "<", end=' ')
+            print(d["minimum_version_id"])
             bump_taint()
 
 
 def check_size(s, d, sec, desc=None, field=None):
     if s["size"] != d["size"]:
-        print "Section \"" + sec + "\"",
+        print("Section \"" + sec + "\"", end=' ')
         if desc:
-            print "Description \"" + desc + "\"",
+            print("Description \"" + desc + "\"", end=' ')
         if field:
-            print "Field \"" + field + "\"",
-        print "size mismatch:", s["size"], ",", d["size"]
+            print("Field \"" + field + "\"", end=' ')
+        print("size mismatch:", s["size"], ",", d["size"])
         bump_taint()
 
 
 def check_machine_type(s, d):
     if s["Name"] != d["Name"]:
-        print "Warning: checking incompatible machine types:",
-        print "\"" + s["Name"] + "\", \"" + d["Name"] + "\""
+        print("Warning: checking incompatible machine types:", end=' ')
+        print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"")
     return
 
 
@@ -400,7 +401,7 @@
             # doesn't exist in dest.
             dest_sec = get_changed_sec_name(sec)
             if not dest_sec in dest_data:
-                print "Section \"" + sec + "\" does not exist in dest"
+                print("Section \"" + sec + "\" does not exist in dest")
                 bump_taint()
                 continue
 
@@ -415,8 +416,8 @@
 
         for entry in s:
             if not entry in d:
-                print "Section \"" + sec + "\": Entry \"" + entry + "\"",
-                print "missing"
+                print("Section \"" + sec + "\": Entry \"" + entry + "\"", end=' ')
+                print("missing")
                 bump_taint()
                 continue
 
