diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-22 18:34:51 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-22 18:34:51 +0400 |
commit | 953b33d3f721e58ab48490d33c141df1e4dd25c1 (patch) | |
tree | 26bce4c2ef75b4ebe8422685d8962aa07978bad2 /sphinx/builders/htmlhelp.py | |
parent | 317930a7fbd49b50fb8a144161a698fcafeab91a (diff) | |
parent | 5f13479408785818ee8b85d4172314ea5578fde3 (diff) | |
download | sphinx-git-953b33d3f721e58ab48490d33c141df1e4dd25c1.tar.gz |
Merge
Diffstat (limited to 'sphinx/builders/htmlhelp.py')
-rw-r--r-- | sphinx/builders/htmlhelp.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py index e1723ba02..e7fa4bde4 100644 --- a/sphinx/builders/htmlhelp.py +++ b/sphinx/builders/htmlhelp.py @@ -9,6 +9,7 @@ :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ +from __future__ import print_function import os import codecs @@ -197,7 +198,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): f = self.open_file(outdir, outname+'.stp') try: for word in sorted(stopwords): - print >>f, word + print(word, file=f) finally: f.close() @@ -217,8 +218,8 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): for fn in files: if (staticdir and not fn.endswith('.js')) or \ fn.endswith('.html'): - print >>f, path.join(root, fn)[olen:].replace(os.sep, - '\\') + print(path.join(root, fn)[olen:].replace(os.sep, '\\'), + file=f) finally: f.close() @@ -256,7 +257,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): write_toc(subnode, ullevel) def istoctree(node): return isinstance(node, addnodes.compact_paragraph) and \ - node.has_key('toctree') + 'toctree' in node for node in tocdoc.traverse(istoctree): write_toc(node) f.write(contents_footer) |