mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Fix more lingering print statements.
This commit is contained in:
parent
fd51975886
commit
b13c493ae5
3 changed files with 14 additions and 14 deletions
|
@ -26,12 +26,12 @@ def getText(nodelist):
|
|||
return rc
|
||||
|
||||
def handleSlideshow(slideshow):
|
||||
print "<html>"
|
||||
print("<html>")
|
||||
handleSlideshowTitle(slideshow.getElementsByTagName("title")[0])
|
||||
slides = slideshow.getElementsByTagName("slide")
|
||||
handleToc(slides)
|
||||
handleSlides(slides)
|
||||
print "</html>"
|
||||
print("</html>")
|
||||
|
||||
def handleSlides(slides):
|
||||
for slide in slides:
|
||||
|
@ -42,23 +42,23 @@ def handleSlide(slide):
|
|||
handlePoints(slide.getElementsByTagName("point"))
|
||||
|
||||
def handleSlideshowTitle(title):
|
||||
print "<title>%s</title>" % getText(title.childNodes)
|
||||
print("<title>%s</title>" % getText(title.childNodes))
|
||||
|
||||
def handleSlideTitle(title):
|
||||
print "<h2>%s</h2>" % getText(title.childNodes)
|
||||
print("<h2>%s</h2>" % getText(title.childNodes))
|
||||
|
||||
def handlePoints(points):
|
||||
print "<ul>"
|
||||
print("<ul>")
|
||||
for point in points:
|
||||
handlePoint(point)
|
||||
print "</ul>"
|
||||
print("</ul>")
|
||||
|
||||
def handlePoint(point):
|
||||
print "<li>%s</li>" % getText(point.childNodes)
|
||||
print("<li>%s</li>" % getText(point.childNodes))
|
||||
|
||||
def handleToc(slides):
|
||||
for slide in slides:
|
||||
title = slide.getElementsByTagName("title")[0]
|
||||
print "<p>%s</p>" % getText(title.childNodes)
|
||||
print("<p>%s</p>" % getText(title.childNodes))
|
||||
|
||||
handleSlideshow(dom)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue