]> granicus.if.org Git - zziplib/commitdiff
use future print_statement
authorGuido Draheim <guidod@gmx.de>
Fri, 23 Mar 2018 23:30:32 +0000 (00:30 +0100)
committerGuido Draheim <guidod@gmx.de>
Fri, 23 Mar 2018 23:30:32 +0000 (00:30 +0100)
docs/makedocs.py

index 1bc8f885e79c3c9ed234c58fbe0d8c53bfde3b1d..244d069305b950f1b43f4606c262dcdfc65a7745 100644 (file)
@@ -1,3 +1,4 @@
+from __future__ import print_function
 import sys
 from zzipdoc.match import *
 from zzipdoc.options import *
@@ -37,7 +38,7 @@ class PerFile:
         return None
     def print_list_mainheader(self):
         for t_fileheader in self.headers:
-            print t_fileheader.get_filename(), t_fileheader.src_mainheader()
+            print (t_fileheader.get_filename(), t_fileheader.src_mainheader())
         
 class PerFunctionEntry:
     def __init__(self, header, comment, prototype):
@@ -66,10 +67,10 @@ class PerFunction:
                                            functionprototype) ]
     def print_list_titleline(self):
         for funcheader in self.headers:
-            print funcheader.get_filename(), "[=>]", funcheader.get_titleline()
+            print (funcheader.get_filename(), "[=>]", funcheader.get_titleline())
     def print_list_name(self):
         for funcheader in self.prototypes:
-            print funcheader.get_filename(), "[>>]", funcheader.get_name()
+            print (funcheader.get_filename(), "[>>]", funcheader.get_name())
 
 class PerFunctionFamilyEntry:
     def __init__(self, leader):
@@ -141,7 +142,7 @@ class PerFunctionFamily:
                 entry.add(func) # the first
                 self.entries += [ entry ]
             else:
-                print "head function '"+name+" has no entry"
+                print ("head function '"+name+" has no entry")
         for func in self.functions:
             name = func.get_name()
             if name in self.retarget:
@@ -150,14 +151,14 @@ class PerFunctionFamily:
                 if entry is not None:
                     entry.add(func) # will not add duplicates
                 else:
-                    print "into function '"+name+" has no entry"
+                    print ("into function '"+name+" has no entry")
     def print_list_name(self):
         for family in self.entries:
             name = family.get_name()
-            print name, ":",
+            print (name, ":", end = " ")
             for item in family.functions:
-                print item.get_name(), ",",
-            print ""
+                print (item.get_name(), ",", end = " ")
+            print ("")
 class HtmlManualPageAdapter:
     def __init__(self, entry):
         """ usually takes a PerFunctionEntry """