--- documentation/processHtml.py.orig 2018-07-18 02:17:49 UTC
+++ documentation/processHtml.py
@@ -25,9 +25,11 @@
import os
import sys
-import string
import re
-import HTMLParser
+try:
+ import HTMLParser
+except:
+ import html.parser as HTMLParser
class HtmlToTextParser(HTMLParser.HTMLParser):
def __init__(self):
@@ -89,10 +91,10 @@ def ReadNavigationTemplate( filePath ):
try:
navFile = open( filePath, "r")
except IOError:
- print "Could not open file \'"+filePath+"\'"
+ print("Could not open file \'"+filePath+"\'")
with navFile:
- print "Navigation template: \'"+filePath+"\'"
+ print("Navigation template: \'"+filePath+"\'")
navHtml = navFile.read()
navHtml = StripHTMLComments(navHtml)
navFile.close()
@@ -109,7 +111,7 @@ def WriteIndexFile( outputFile, content ):
except:
pass
- print "Creating Search-Index File : \""+outputFile+"\""
+ print("Creating Search-Index File : \""+outputFile+"\"")
f = open(outputFile, "w")
f.write(content)
@@ -117,7 +119,7 @@ def WriteIndexFile( outputFile, content ):
#-------------------------------------------------------------------------------
def Usage():
- print str(sys.argv[0])+"