# HG changeset patch # User Jan Kanis # Date 1404728428 -7200 # Node ID ee2b105d772ae128828d32a6e803eb35080fc82f # Parent ed71448ee1548ff49be43cd4bfd26f138ede8e70 minor fix diff -r ed71448ee154 -r ee2b105d772a blast2html.py --- a/blast2html.py Mon Jul 07 11:50:50 2014 +0200 +++ b/blast2html.py Mon Jul 07 12:20:28 2014 +0200 @@ -455,7 +455,7 @@ # argument, so for python 2 we need to wrap or reopen the # output. The input files are already read as utf-8 by the # respective libraries. - + # # One option is using codecs, but the codecs' writelines() # method doesn't support streaming but collects all output and # writes at once (see Python issues #5445 and #21910). On the @@ -463,6 +463,12 @@ # significantly). # args.output = codecs.getwriter('utf-8')(args.output) + # def fixed_writelines(iter, self=args.output): + # for i in iter: + # self.write(i) + # args.output.writelines = fixed_writelines + + args.output.close() args.output = io.open(args.output.name, 'w') templatedir, templatename = path.split(args.template.name)