On Saturday, November 11, 2017 at 8:07:06 PM UTC-6, jf...@ms4.hinet.net wrote: [...] > By the way, does anyone know what the following codes does? > (in printer.py file) and how to convert it to v3.x? > > class WrapperPrinter: > def __init__(self,outpath,options,data): > ... > ... > self.print_header() > print >>self.file > > self.print_preamble() > print >>self.file > > self.print_loader() > print >>self.file > ... > ...
`print` was changed from a statement to a function, so it's just a matter of converting it to a function call. If you read the docs for the new print function, it should be relatively easy to translate. I don't understand why you're having so much trouble. https://docs.python.org/3/whatsnew/3.0.html?highlight=print#common-stumbling-blocks -- https://mail.python.org/mailman/listinfo/python-list