From: Guido Draheim Date: Fri, 23 Mar 2018 23:30:32 +0000 (+0100) Subject: use future print_statement X-Git-Tag: v0.13.70~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=536105181eb3ca4135839be58a60457a05713920;p=zziplib use future print_statement --- diff --git a/docs/makedocs.py b/docs/makedocs.py index 1bc8f88..244d069 100644 --- a/docs/makedocs.py +++ b/docs/makedocs.py @@ -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 """