Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b13c493

Browse files
committed
Fix more lingering print statements.
1 parent fd51975 commit b13c493

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

Doc/includes/minidom-example.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ def getText(nodelist):
2626
return rc
2727

2828
def handleSlideshow(slideshow):
29-
print "<html>"
29+
print("<html>")
3030
handleSlideshowTitle(slideshow.getElementsByTagName("title")[0])
3131
slides = slideshow.getElementsByTagName("slide")
3232
handleToc(slides)
3333
handleSlides(slides)
34-
print "</html>"
34+
print("</html>")
3535

3636
def handleSlides(slides):
3737
for slide in slides:
@@ -42,23 +42,23 @@ def handleSlide(slide):
4242
handlePoints(slide.getElementsByTagName("point"))
4343

4444
def handleSlideshowTitle(title):
45-
print "<title>%s</title>" % getText(title.childNodes)
45+
print("<title>%s</title>" % getText(title.childNodes))
4646

4747
def handleSlideTitle(title):
48-
print "<h2>%s</h2>" % getText(title.childNodes)
48+
print("<h2>%s</h2>" % getText(title.childNodes))
4949

5050
def handlePoints(points):
51-
print "<ul>"
51+
print("<ul>")
5252
for point in points:
5353
handlePoint(point)
54-
print "</ul>"
54+
print("</ul>")
5555

5656
def handlePoint(point):
57-
print "<li>%s</li>" % getText(point.childNodes)
57+
print("<li>%s</li>" % getText(point.childNodes))
5858

5959
def handleToc(slides):
6060
for slide in slides:
6161
title = slide.getElementsByTagName("title")[0]
62-
print "<p>%s</p>" % getText(title.childNodes)
62+
print("<p>%s</p>" % getText(title.childNodes))
6363

6464
handleSlideshow(dom)

Doc/tools/sphinx-build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
if __name__ == '__main__':
1313

1414
if sys.version_info[:3] < (2, 5, 1):
15-
print >>sys.stderr, """\
15+
print("""\
1616
Error: Sphinx needs to be executed with Python 2.5.1 or newer
1717
(If you run this from the Makefile, you can set the PYTHON variable
1818
to the path of an alternative interpreter executable, e.g.,
1919
``make html PYTHON=python2.5``).
20-
"""
20+
""", file=sys.stderr)
2121
sys.exit(1)
2222

2323
from sphinx import main

PC/testpy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
try:
88
import os
99
except:
10-
print """Could not import the standard "os" module.
11-
Please check your PYTHONPATH environment variable."""
10+
print("""Could not import the standard "os" module.
11+
Please check your PYTHONPATH environment variable.""")
1212
sys.exit(1)
1313

1414
try:
1515
import symbol
1616
except:
17-
print """Could not import the standard "symbol" module. If this is
18-
a PC, you should add the dos_8x3 directory to your PYTHONPATH."""
17+
print("""Could not import the standard "symbol" module. If this is
18+
a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
1919
sys.exit(1)
2020

2121
import os

0 commit comments

Comments
 (0)