[Scummvm-git-logs] scummvm master -> ecf7283251cc02513884cfce9c7fbc255c05e9f2

antoniou79 noreply at scummvm.org
Mon Jun 5 16:53:46 UTC 2023


This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a17cf366cb CREATE_BLADERUNNER: Change header from 'UTF-8' to 'utf-8'
11e01d9da9 CREATE_BLADERUNNER: Add missing parenthesis in python print
917559e349 CREATE_BLADERUNNER: Fix import of errno in Python 3
4c8251c40c CREATE_BLADERUNNER: Fix missing spaces and tabs mix
8bb7e87fd5 CREATE_BLADERUNNER: Add missing list(zip
a863683a75 CREATE_BLADERUNNER: Add and use comp unicode python wrappers
1a212bb635 CREATE_BLADERUNNER: Add missing final newline
7373cc0de5 CREATE_BLADERUNNER: Migrate create_bladerunner from xlrd to pandas
ecf7283251 CREATE_BLADERUNNER: Remove Python 2.7 guard


Commit: a17cf366cbb4fb7af70fb216fffdc2db53aa9cfb
    https://github.com/scummvm/scummvm/commit/a17cf366cbb4fb7af70fb216fffdc2db53aa9cfb
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Change header from 'UTF-8' to 'utf-8'

Current python and emacs prefer "utf-8".

Changed paths:
    devtools/create_bladerunner/subtitles/common/extracsTextResource.py
    devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
    devtools/create_bladerunner/subtitles/common/vqasTextResource.py
    devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
    devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
    devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
    devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
    devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/sortBladeRunnerWavs02.py
    devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py


diff --git a/devtools/create_bladerunner/subtitles/common/extracsTextResource.py b/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
index 89b2b05f40e..f4674d67fca 100644
--- a/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
+++ b/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 
 my_module_version = "1.60"
diff --git a/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py b/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
index e6d54bb9109..b2835e358bc 100644
--- a/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
+++ b/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 
 my_module_version = "1.60"
diff --git a/devtools/create_bladerunner/subtitles/common/vqasTextResource.py b/devtools/create_bladerunner/subtitles/common/vqasTextResource.py
index 78b77326334..08d90e3919a 100644
--- a/devtools/create_bladerunner/subtitles/common/vqasTextResource.py
+++ b/devtools/create_bladerunner/subtitles/common/vqasTextResource.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 
 my_module_version = "1.60"
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
index a4307b25990..e6605a691dd 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 osLibFound = False
 sysLibFound = False
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py b/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
index 8f1301ba290..8b658c8891f 100755
--- a/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 sysLibFound = False
 try:
 	import sys
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
index 182f41cb412..766675e7b0c 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #-------------------------------------------------------------------------------
 # Name:		   grabberFromPNG15BR
 # Purpose:	   Parse the character fonts from a PNG file in order to create a
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
index 8a7930053fd..288139cc702 100755
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 sysLibFound = False
 try:
 	import sys
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
index a6db54edc84..21b8342f54c 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 # Created by Praetorian (ShadowNate) for Classic Adventures in Greek
 # classic.adventures.in.greek at gmail.com
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
index cce4ef3add7..b1e6a594f68 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 ctypesLibFound = False
 structLibFound = False
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
index f3e196e6952..2e4181b1621 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 osLibFound = False
 sysLibFound = False
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
index 6060fa3a637..1c94a82fdc5 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 
 my_module_version = "1.00"
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
index e164b2123f6..d16f0b6f6aa 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 
 my_module_version = "1.00"
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
index 7a7e1f369a6..a2c4cae2400 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 sysLibFound = False
 try:
 	import sys
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/sortBladeRunnerWavs02.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/sortBladeRunnerWavs02.py
index e8da9739faa..63f34ab6987 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/sortBladeRunnerWavs02.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/sortBladeRunnerWavs02.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 # Created by Praetorian (ShadowNate) for Classic Adventures in Greek
 # classic.adventures.in.greek at gmail.com
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py
index f1250e06e7e..4c8556a6ebd 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
 #
 osLibFound = False
 sysLibFound = False


Commit: 11e01d9da951e9bac97ebb0a1166b64c7ab1c8de
    https://github.com/scummvm/scummvm/commit/11e01d9da951e9bac97ebb0a1166b64c7ab1c8de
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Add missing parenthesis in python print

Changed paths:
    devtools/create_bladerunner/subtitles/common/extracsTextResource.py
    devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
    devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
    devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
    devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py


diff --git a/devtools/create_bladerunner/subtitles/common/extracsTextResource.py b/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
index f4674d67fca..29a5c47d306 100644
--- a/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
+++ b/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
@@ -35,7 +35,7 @@ class extracTextResource:
 
 	def printExtracTemplate(self):
 		for (idTre, textTre) in EXTRAC_TEXT_RESOURCE_TUPLE_LIST:
-			print "%s\t%s" % (idTre, textTre)
+			print ("%s\t%s" % (idTre, textTre))
 		return
 
 	def getExtracEntriesList(self):
@@ -43,7 +43,7 @@ class extracTextResource:
 
 if __name__ == '__main__':
 	#	 main()
-	print "[Debug] Running %s as main module" % (my_module_name)
+	print ("[Debug] Running %s as main module" % (my_module_name))
 	traceModeEnabled = False
 	excrTRInstance = extracTextResource(traceModeEnabled)
 	excrTRInstance.printExtracTemplate()
diff --git a/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py b/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
index b2835e358bc..92d8b83604e 100644
--- a/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
+++ b/devtools/create_bladerunner/subtitles/common/subtlsVersTextResource.py
@@ -24,7 +24,7 @@ class sbtlVersTextResource:
 
 	def printSbtlVersTemplate(self):
 		for (idTre, textTre) in SBTLVERS_TEXT_RESOURCE_TUPLE_LIST:
-			print "%s\t%s" % (idTre, textTre)
+			print ("%s\t%s" % (idTre, textTre))
 		return
 
 	def getSbtlVersEntriesList(self):
@@ -32,7 +32,7 @@ class sbtlVersTextResource:
 
 if __name__ == '__main__':
 	#	 main()
-	print "[Debug] Running %s as main module" % (my_module_name)
+	print ("[Debug] Running %s as main module" % (my_module_name))
 	traceModeEnabled = False
 	sbtlVersTRInstance = sbtlVersTextResource(traceModeEnabled)
 	sbtlVersTRInstance.printSbtlVersTemplate()
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
index e6605a691dd..2414bbb455e 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
@@ -10,28 +10,28 @@ imagePilLibFound = False
 try:
 	import os
 except ImportError:
-	print "[Error] os python library is required to be installed!"
+	print ("[Error] os python library is required to be installed!")
 else:
 	osLibFound = True
 
 try:
 	import sys
 except ImportError:
-	print "[Error] sys python library is required to be installed!"
+	print ("[Error] sys python library is required to be installed!")
 else:
 	sysLibFound = True
 
 try:
 	import struct
 except ImportError:
-	print "[Error] struct python library is required to be installed!"
+	print ("[Error] struct python library is required to be installed!")
 else:
 	structLibFound = True
 
 try:
 	from PIL import Image
 except ImportError:
-	print "[Error] Image python library (PIL) is required to be installed!"
+	print ("[Error] Image python library (PIL) is required to be installed!")
 else:
 	imagePilLibFound = True
 
@@ -97,7 +97,7 @@ class fonFile(object):
 			if self.simpleFontFileName == 'TAHOMA18.FON': # deal with corrupted original 'TAHOMA18.FON' file
 				self.realNumOfCharactersInImageSegment = 176
 				if self.m_traceModeEnabled:
-					print "[Debug] SPECIAL CASE. WORKAROUND FOR CORRUPTED %s FILE. Only %d characters supported!" % (self.simpleFontFileName, self.realNumOfCharactersInImageSegment)
+					print ("[Debug] SPECIAL CASE. WORKAROUND FOR CORRUPTED %s FILE. Only %d characters supported!" % (self.simpleFontFileName, self.realNumOfCharactersInImageSegment))
 			else:
 				self.realNumOfCharactersInImageSegment = self.header().maxEntriesInTableOfDetails
 
@@ -114,15 +114,15 @@ class fonFile(object):
 			offsInFonFile += 4
 
 			if self.m_traceModeEnabled:
-				print "[Debug] Font file (FON) Header Info: "
-				print "[Debug] Number of entries: %d, Glyph max-Width: %d, Glyph max-Height: %d, Graphic Segment size: %d" % (self.header().maxEntriesInTableOfDetails, self.header().maxGlyphWidth, self.header().maxGlyphHeight, self.header().graphicSegmentByteSize)
+				print ("[Debug] Font file (FON) Header Info: ")
+				print ("[Debug] Number of entries: %d, Glyph max-Width: %d, Glyph max-Height: %d, Graphic Segment size: %d" % (self.header().maxEntriesInTableOfDetails, self.header().maxGlyphWidth, self.header().maxGlyphHeight, self.header().graphicSegmentByteSize))
 			#
 			# Glyph details table (each entry is 5 unsigned integers == 5*4 = 20 bytes)
 			# For most characters, their ASCII value + 1 is the index of their glyph's entry in the details table. The 0 entry of this table is reserved
 			#
 			#tmpXOffset, tmpYOffset, tmpWidth, tmpHeight, tmpDataOffset
 			if self.m_traceModeEnabled:
-				print "[Debug] Font file (FON) glyph details table: "
+				print ("[Debug] Font file (FON) glyph details table: ")
 			for idx in range(0, self.realNumOfCharactersInImageSegment):
 				tmpTuple = struct.unpack_from('i', fonBytesBuff, offsInFonFile)  # unsigned integer 4 bytes
 				tmpXOffset = tmpTuple[0]
@@ -146,17 +146,17 @@ class fonFile(object):
 
 				if tmpWidth == 0 or tmpHeight == 0:
 					if self.m_traceModeEnabled:
-						print "Index: %d\t UNUSED *****************************************************************" % (idx)
+						print ("Index: %d\t UNUSED *****************************************************************" % (idx))
 				else:
 					self.nonEmptyCharacters += 1
 					if self.m_traceModeEnabled:
-						print "Index: %d\txOffs: %d\tyOffs: %d\twidth: %d\theight: %d\tdataOffs: %d" % (idx, tmpXOffset, tmpYOffset, tmpWidth, tmpHeight, tmpDataOffset)
+						print ("Index: %d\txOffs: %d\tyOffs: %d\twidth: %d\theight: %d\tdataOffs: %d" % (idx, tmpXOffset, tmpYOffset, tmpWidth, tmpHeight, tmpDataOffset))
 					if tmpDataOffset not in localLstOfDataOffsets:
 						localLstOfDataOffsets.append(tmpDataOffset)
 					else:
 						# This never happens in the original files. Offsets are "re-used" but not really because it happens only for empty (height = 0) characters which all seem to point to the next non-empty character
 						if self.m_traceModeEnabled:
-							print "Index: %d\t RE-USING ANOTHER GLYPH *****************************************************************" % (idx)
+							print ("Index: %d\t RE-USING ANOTHER GLYPH *****************************************************************" % (idx))
 
 				self.glyphDetailEntriesLst.append( ( tmpXOffset, tmpYOffset, tmpWidth, tmpHeight, tmpDataOffset) )
 
@@ -164,12 +164,12 @@ class fonFile(object):
 			self.glyphPixelData = fonBytesBuff[offsInFonFile:]
 			return True
 		except:
-			print "[Error] Loading Font file (FON) %s failed!" % (self.simpleFontFileName)
+			print ("[Error] Loading Font file (FON) %s failed!" % (self.simpleFontFileName))
 			raise
 		return False
 
 	def outputFonToPNG(self):
-		print "[Info] Exporting font file (FON) to PNG: %s" % (self.simpleFontFileName + ".PNG")
+		print ("[Info] Exporting font file (FON) to PNG: %s" % (self.simpleFontFileName + ".PNG"))
 
 		targWidth = 0
 		targHeight = 0
@@ -177,7 +177,7 @@ class fonFile(object):
 		paddingBetweenGlyphsX = 10
 
 		if len(self.glyphDetailEntriesLst) == 0 or (len(self.glyphDetailEntriesLst) != self.realNumOfCharactersInImageSegment and len(self.glyphDetailEntriesLst) != self.header().maxEntriesInTableOfDetails) :
-			print "[Error] Font file (FON) loading process did not complete correctly. Missing important data in structures. Cannot output image!"
+			print ("[Error] Font file (FON) loading process did not complete correctly. Missing important data in structures. Cannot output image!")
 			return
 
 		# TODO asdf refine this code here. the dimensions calculation is very crude for now
@@ -240,7 +240,7 @@ class fonFile(object):
 		try:
 			imTargetGameFont.save(os.path.join('.', self.simpleFontFileName + ".PNG"), "PNG")
 		except Exception as e:
-			print '[Error] Unable to write to output PNG file. ' + str(e)
+			print ('[Error] Unable to write to output PNG file. ' + str(e))
 
 	def header(self):
 		return self.m_header
@@ -265,31 +265,31 @@ if __name__ == '__main__':
 		and len(sys.argv[1]) >= 5 \
 		and sys.argv[1][-3:].upper() == 'FON':
 		inFONFileName = sys.argv[1]
-		print "[Info] Attempting to use %s as input FON file..." % (inFONFileName)
+		print ("[Info] Attempting to use %s as input FON file..." % (inFONFileName))
 	elif os.path.isfile(os.path.join('.', inFONFileName)):
-		print "[Info] Using default %s as input FON file..." % (inFONFileName)
+		print ("[Info] Using default %s as input FON file..." % (inFONFileName))
 	else:
-		print "[Error] No valid input file argument was specified and default input file %s is missing." % (inFONFileName)
+		print ("[Error] No valid input file argument was specified and default input file %s is missing." % (inFONFileName))
 		errorFound = True
 
 	if not errorFound:
 		try:
-			print "[Info] Opening %s" % (inFONFileName)
+			print ("[Info] Opening %s" % (inFONFileName))
 			inFONFile = open(os.path.join('.',inFONFileName), 'rb')
 		except:
 			errorFound = True
-			print "[Error] Unexpected event:", sys.exc_info()[0]
+			print ("[Error] Unexpected event:", sys.exc_info()[0])
 			raise
 		if not errorFound:
 			allOfFonFileInBuffer = inFONFile.read()
 			fonFileInstance = fonFile(True)
 			if fonFileInstance.m_traceModeEnabled:
-				print "[Debug] Running %s (%s) as main module" % (MY_MODULE_NAME, MY_MODULE_VERSION)
+				print ("[Debug] Running %s (%s) as main module" % (MY_MODULE_NAME, MY_MODULE_VERSION))
 			if (fonFileInstance.loadFonFile(allOfFonFileInBuffer, len(allOfFonFileInBuffer), inFONFileName)):
-				print "[Info] Font file (FON) was loaded successfully!"
+				print ("[Info] Font file (FON) was loaded successfully!")
 				fonFileInstance.outputFonToPNG()
 			else:
-				print "[Error] Error while loading Font file (FON)!"
+				print ("[Error] Error while loading Font file (FON)!")
 			inFONFile.close()
 else:
 	#debug
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
index 766675e7b0c..800e18b9c5a 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
@@ -76,42 +76,42 @@ reLibFound = False
 try:
 	import os
 except ImportError:
-	print "[Error] os python library is required to be installed!"
+	print ("[Error] os python library is required to be installed!")
 else:
 	osLibFound = True
 
 try:
 	import sys
 except ImportError:
-	print "[Error] sys python library is required to be installed!"
+	print ("[Error] sys python library is required to be installed!")
 else:
 	sysLibFound = True
 
 try:
 	import shutil
 except ImportError:
-	print "[Error] Shutil python library is required to be installed!"
+	print ("[Error] Shutil python library is required to be installed!")
 else:
 	shutilLibFound = True
 
 try:
 	import struct
 except ImportError:
-	print "[Error] struct python library is required to be installed!"
+	print ("[Error] struct python library is required to be installed!")
 else:
 	structLibFound = True
 
 try:
 	from PIL import Image
 except ImportError:
-	print "[Error] Image python library (PIL) is required to be installed!"
+	print ("[Error] Image python library (PIL) is required to be installed!")
 else:
 	imagePilLibFound = True
 
 try:
 	import re
 except ImportError:
-	print "[Error] re (Regular expression operations) python library is required to be installed!"
+	print ("[Error] re (Regular expression operations) python library is required to be installed!")
 else:
 	reLibFound = True
 
@@ -234,10 +234,10 @@ class grabberFromPNG:
 			overrideEncodingTextFile = u'overrideEncoding.txt'
 			relPath = u'.'
 			self.overrideEncodingPath = os.path.join(relPath,overrideEncodingTextFile)
-			print "[Warning] Font Creation Override Encoding file not found in arguments. Attempting to open local file %s, if it exists" % (overrideEncodingTextFile)
+			print ("[Warning] Font Creation Override Encoding file not found in arguments. Attempting to open local file %s, if it exists" % (overrideEncodingTextFile))
 
 		if os.access(self.overrideEncodingPath, os.F_OK):
-			print "[Info] Override encoding file found: {0}.".format(self.overrideEncodingPath)
+			print ("[Info] Override encoding file found: {0}.".format(self.overrideEncodingPath))
 			overEncodFile = open(self.overrideEncodingPath, 'r')
 			linesLst = overEncodFile.readlines()
 			overEncodFile.close()
@@ -245,7 +245,7 @@ class grabberFromPNG:
 				overrideFailed = True
 			else:
 				if gTraceModeEnabled:
-					print "[Debug] Parsing Override Encoding file info..."
+					print ("[Debug] Parsing Override Encoding file info...")
 				involvedTokensLst =[]
 				del involvedTokensLst[:] # unneeded
 				for readEncodLine in linesLst:
@@ -297,11 +297,11 @@ class grabberFromPNG:
 					overrideFailed = False
 
 				if gTraceModeEnabled:
-					print "[Debug] Target Encoding: ", self.targetEncoding
+					print ("[Debug] Target Encoding: ", self.targetEncoding)
 					#print "[Debug] Lang Order: ", targetLangOrderAndListOfForeignLettersStrUnicode
-					print "[Debug] Explicit Kern List: ", self.listOfExplicitKerning
-					print "[Debug] Explicit Width Increment List: ", self.listOfWidthIncrements
-					print "[Debug] Original Font Name: ", self.originalFontName
+					print ("[Debug] Explicit Kern List: ", self.listOfExplicitKerning)
+					print ("[Debug] Explicit Width Increment List: ", self.listOfWidthIncrements)
+					print ("[Debug] Original Font Name: ", self.originalFontName)
 
 			if(len(self.listOfOutOfOrderGlyphs) == 0 and self.specialGlyphMode == True):
 				# Just keep those that are needed
@@ -315,15 +315,15 @@ class grabberFromPNG:
 					self.listOfOutOfOrderGlyphs.append((u'\xe9', u'\u0192')) 	# french e punctuated
 					self.listOfOutOfOrderGlyphs.append((u'\xfc', u'\u2013')) 	# u umlaut
 			if gTraceModeEnabled:
-				print "[Debug] Explicit Out Of Order Glyphs List: " , self.listOfOutOfOrderGlyphs
+				print ("[Debug] Explicit Out Of Order Glyphs List: " , self.listOfOutOfOrderGlyphs)
 		else:
 			## error
-			print "[Error] Override encoding file not found: {0}.".format(self.overrideEncodingPath)
+			print ("[Error] Override encoding file not found: {0}.".format(self.overrideEncodingPath))
 			pass
 
 		if overrideFailed:
 			## error
-			print "[Error] Override encoding file parsing has failed: Error Code 1." #" Initializing for {0}...".format(self.defaultTargetLang)
+			print ("[Error] Override encoding file parsing has failed: Error Code 1.") #" Initializing for {0}...".format(self.defaultTargetLang)
 			#if gTraceModeEnabled:
 			#	self.targetEncoding = self.defaultTargetEncoding
 			#	self.targetEncodingUnicode = self.defaultTargetEncodingUnicode
@@ -335,7 +335,7 @@ class grabberFromPNG:
 			targetLangOrderAndListOfForeignLettersStr = unicode.encode("%s" % targetLangOrderAndListOfForeignLettersStrUnicode, self.targetEncoding)
 		except:
 			## error
-			print "[Error] Override encoding file parsing has failed: Error Code 2." #"Initializing for {0}...".format(self.defaultTargetLang)
+			print ("[Error] Override encoding file parsing has failed: Error Code 2.") #"Initializing for {0}...".format(self.defaultTargetLang)
 			#if gTraceModeEnabled:
 			#	self.targetEncoding = self.defaultTargetEncoding
 			#	self.targetEncodingUnicode = self.defaultTargetEncodingUnicode
@@ -346,10 +346,10 @@ class grabberFromPNG:
 
 		targetLangOrderAndListOfForeignLetters = list(targetLangOrderAndListOfForeignLettersStr)
 		if gTraceModeEnabled:
-			print '[Debug] ', targetLangOrderAndListOfForeignLetters, len(targetLangOrderAndListOfForeignLetters)	   # new
+			print ('[Debug] ', targetLangOrderAndListOfForeignLetters, len(targetLangOrderAndListOfForeignLetters))	   # new
 		self.targetLangOrderAndListOfForeignLettersAsciiValues = [ord(i) for i in targetLangOrderAndListOfForeignLetters]
 		if gTraceModeEnabled:
-			print '[Debug] ', self.targetLangOrderAndListOfForeignLettersAsciiValues, len(self.targetLangOrderAndListOfForeignLettersAsciiValues)
+			print ('[Debug] ', self.targetLangOrderAndListOfForeignLettersAsciiValues, len(self.targetLangOrderAndListOfForeignLettersAsciiValues))
 		self.maxAsciiValueInEncoding = max(self.targetLangOrderAndListOfForeignLettersAsciiValues)
 	#if gTraceModeEnabled:
 	#	for charAsciiValue in targetLangOrderAndListOfForeignLetters:
@@ -486,7 +486,7 @@ class grabberFromPNG:
 			for y in range(0, imheight):	 # we search all rows (for each column)
 				if type(loadedImag[x, y]) is not tuple or len(loadedImag[x, y]) < 4:
 					#print type(loadedImag[x, y]), len(loadedImag[x, y])
-					print "[Error] Bad format for pixel type -- probable cause: unsupported PNG optimization"
+					print ("[Error] Bad format for pixel type -- probable cause: unsupported PNG optimization")
 					return -2
 
 				r1,g1,b1,a1 = loadedImag[x, y]
@@ -570,7 +570,7 @@ class grabberFromPNG:
 						#	print "[Debug] start startPre: ", startCol, self.startColOfPrevFontLetter
 						self.tabSpaceWidth = startCol - self.startColOfPrevFontLetter
 						if gTraceModeEnabled:
-							print "[Debug] Tab Space Width detected: %d " % (self.tabSpaceWidth)
+							print ("[Debug] Tab Space Width detected: %d " % (self.tabSpaceWidth))
 					# new if -- don't use else here, to include the case of when we first detected the tab space width
 					if self.tabSpaceWidth > 0:
 						self.listOfXOffsets.append(startCol - (self.startOfAllLettersIncludingTheExtraDoubleAndWithKern + (self.lettersFound + 1) * self.tabSpaceWidth) ) #	 + self.deductKerningPixels )
@@ -641,18 +641,18 @@ class grabberFromPNG:
 				im = Image.open(self.imageRowFilePNG)
 			except:
 				errMsg = "[Error] No letters were found in input png - IO exception!"
-				print errMsg
+				print (errMsg)
 				retVal = -2
 				errorFound = True
 		else:
 			errMsg = "[Error] No letters were found in input png - IO fault!"
-			print errMsg
+			print (errMsg)
 			retVal = -2
 			errorFound = True
 		if not errorFound:
 			#debug
 			if gTraceModeEnabled:
-				print "[Debug] ", self.imageRowFilePNG, im.format, "%dx%d" % im.size, im.mode
+				print ("[Debug] ", self.imageRowFilePNG, im.format, "%dx%d" % im.size, im.mode)
 			w1, h1 = im.size
 			trimTopPixels = 0
 			trimBottomPixels = 0
@@ -661,7 +661,7 @@ class grabberFromPNG:
 			# TODO the special settings for handling italic native letters should be in the settings(?)
 			filepathSplitTbl = os.path.split(self.imageRowFilePNG)
 			sFilenameOnlyImageRowFilePNG = filepathSplitTbl[1]
-			print "[Info] Parsing input Font glyphs image %s. Please wait..." % (sFilenameOnlyImageRowFilePNG)
+			print ("[Info] Parsing input Font glyphs image %s. Please wait..." % (sFilenameOnlyImageRowFilePNG))
 
 			if sFilenameOnlyImageRowFilePNG.startswith("itcrp_") or sFilenameOnlyImageRowFilePNG.startswith("it_"):
 				italicsMode = True
@@ -669,7 +669,7 @@ class grabberFromPNG:
 			if sFilenameOnlyImageRowFilePNG.startswith("itcrp_"):
 				trimTopPixels = 1
 				trimBottomPixels = 1
-				print "[Info] Mode Enabled: Trim upper line by %d pixels and bottom line by %d pixels." % (trimTopPixels, trimBottomPixels)
+				print ("[Info] Mode Enabled: Trim upper line by %d pixels and bottom line by %d pixels." % (trimTopPixels, trimBottomPixels))
 			pix = im.load()
 			# pix argument is mutable (will be changed in the parseImage body)
 			if self.parseImage(pix, w1, h1, trimTopPixels, trimBottomPixels, True) == 0:	#first run, just get the start column, ignore the letter - don't store it . We need this for the tab space width calculation and eventually the kerning calc of the letters
@@ -679,7 +679,7 @@ class grabberFromPNG:
 			#debug
 			#if gTraceModeEnabled:
 			#	print "[Debug] ", self.listOfBaselines
-			print "[Info] Font Glyphs Detected (not including the first double): %d" % (self.lettersFound)
+			print ("[Info] Font Glyphs Detected (not including the first double): %d" % (self.lettersFound))
 			if (self.lettersFound ) > 0 :
 				#if gTraceModeEnabled:
 				#	print "[Debug] widths: ", self.listOfWidths[0:]
@@ -726,13 +726,13 @@ class grabberFromPNG:
 				maxFontWidth =	max(listOfCalcWidths)
 				maxFontHeight =	 max(self.listOfHeights)
 				if gTraceModeEnabled:
-					print "[Debug] Max Width: %d, Max Height: %d (not necessarily for the same character glyph)." % (maxFontWidth, maxFontHeight)
+					print ("[Debug] Max Width: %d, Max Height: %d (not necessarily for the same character glyph)." % (maxFontWidth, maxFontHeight))
 				#	print "Index\tAsciiOrd\tX Offs\tY Offs\tWidth\tHeight"
 				#	print zip(range(1, len(self.listOfXOffsets)), self.targetLangOrderAndListOfForeignLettersAsciiValues[1:], self.listOfXOffsets, self.listOfYOffsets, listOfCalcWidths, self.listOfHeights)
 				numberOfEntriesInFontTable = self.maxAsciiValueInEncoding + 1 + 1  # 0x0100 # This is actually the max ascii value + plus one (1) to get the font index value + plus another one (1) to get the count (since we have zero based indices)
 				# TODO ??? could be more than this if we need to keep other characters (not in our codeset) and expand the ascii table and offset the new characters
 				if self.maxAsciiValueInEncoding > 254:
-					print "[Error] Max ascii value is too large. Should be less than or equal to 254 (max)"
+					print ("[Error] Max ascii value is too large. Should be less than or equal to 254 (max)")
 					errorFound = True
 					retVal = -3
 				if not errorFound:
@@ -740,10 +740,10 @@ class grabberFromPNG:
 					try:
 						targetFontFile = open(self.targetFONFilename, 'wb')
 					except Exception as e:
-						print '[Error] Failed to create target font (FON) file: ' + self.targetFONFilename + '::' + str(e)
+						print ('[Error] Failed to create target font (FON) file: ' + self.targetFONFilename + '::' + str(e))
 						errorFound = True
 					if not errorFound:
-						print '[Info] Creating target font (FON) file: ' + self.targetFONFilename
+						print ('[Info] Creating target font (FON) file: ' + self.targetFONFilename)
 					# reopen the image with our Fonts because we deleted the letters in the in-mem copy
 						im = None
 						if os.access(self.imageRowFilePNG, os.F_OK) :
@@ -765,7 +765,7 @@ class grabberFromPNG:
 							#
 							# pack 'I' unsigned int
 							if gTraceModeEnabled:
-								print "[Debug] Number Of Entries In Font Table: ", (self.maxAsciiValueInEncoding + 1 + 1)
+								print ("[Debug] Number Of Entries In Font Table: ", (self.maxAsciiValueInEncoding + 1 + 1))
 							numberOfEntriesInFontTableInFile = pack('I', numberOfEntriesInFontTable )
 							targetFontFile.write(numberOfEntriesInFontTableInFile)
 							maxFontWidthPixelsToWrite = pack('I', maxFontWidth)
@@ -895,10 +895,10 @@ class grabberFromPNG:
 							# end of for loop over all possible ascii values contained in the fon file
 							# print the corrected properties per glyph font:
 							if gTraceModeEnabled:
-								print "***** FINAL (Explicit kerning and width accounted) *****\nIndex\tAsciiOrd\tX Offs\tY Offs\tWidth\tHeight"
+								print ("***** FINAL (Explicit kerning and width accounted) *****\nIndex\tAsciiOrd\tX Offs\tY Offs\tWidth\tHeight")
 								tmpListOfTuplesToPrintDbg = zip(range(1, len(self.listOfXOffsets)), self.targetLangOrderAndListOfForeignLettersAsciiValues[1:], self.listOfXOffsets, self.listOfYOffsets, listOfCalcWidths, self.listOfHeights)
 								for itemDbg in tmpListOfTuplesToPrintDbg:
-									print "%4d\t%8d\t%6d\t%6d\t%6d\t%6d" % (itemDbg[0], itemDbg[1], itemDbg[2], itemDbg[3], itemDbg[4], itemDbg[5])
+									print ("%4d\t%8d\t%6d\t%6d\t%6d\t%6d" % (itemDbg[0], itemDbg[1], itemDbg[2], itemDbg[3], itemDbg[4], itemDbg[5]))
 								#print "\n"
 							#
 							#
@@ -999,18 +999,18 @@ class grabberFromPNG:
 
 			else: ## if (self.lettersFound ) <= 0
 				errMsg = "[Error] No letters were found in input png!"
-				print errMsg
+				print (errMsg)
 				retVal = -2
 		if retVal == 0:
-			print "[Info] Done."
+			print ("[Info] Done.")
 		else:
-			print "[Error] Errors were found during execution."
+			print ("[Error] Errors were found during execution.")
 		return (retVal, errMsg, origGameFontSizeEqBaseLine, totalFontLetters, importedNumOfLetters)
 
 	def exportFonFilesFromMix(self):
 		""" Generate PNG files out of FON files stores in a MIX resource
 		"""
-		print "[Info] Checking in %s for MIX files to export font files (FON) from..." % (self.inputFonMixPath)
+		print ("[Info] Checking in %s for MIX files to export font files (FON) from..." % (self.inputFonMixPath))
 		inputMIXFilesFound = []
 		# breaking after first for loop yields only the top directory files, which is what we want
 		for (dirpath, dirnames, filenames) in walk(self.inputFonMixPath):
@@ -1021,11 +1021,11 @@ class grabberFromPNG:
 			break
 
 		if len(inputMIXFilesFound) == 0:
-			print "[Error] No supported game archive resource files (MIX) were found in the specified input path (-ip switch)"
+			print ("[Error] No supported game archive resource files (MIX) were found in the specified input path (-ip switch)")
 			sys.exit(1)
 
 		for tmpMIXfileName in inputMIXFilesFound:
-			print "[Info] Found MIX file: %s" % ('"' + tmpMIXfileName + '"')
+			print ("[Info] Found MIX file: %s" % ('"' + tmpMIXfileName + '"'))
 			errorFound = False
 			inMIXFile = None
 			#
@@ -1033,7 +1033,7 @@ class grabberFromPNG:
 				inMIXFile = open(os.path.join(self.inputFonMixPath,tmpMIXfileName), 'rb')
 			except:
 				errorFound = True
-				print "[Error] Unexpected event:", sys.exc_info()[0]
+				print ("[Error] Unexpected event:", sys.exc_info()[0])
 				raise
 			if not errorFound:
 				totalFONs = 0
@@ -1051,9 +1051,9 @@ class grabberFromPNG:
 				# 12 bytes per MIX entry in entries table
 				# quick size validation
 				if gTraceModeEnabled:
-					print "[Debug] MIX file entries: %d, Data segment: %d bytes" % (numOfEntriesToExport, allMixFileSize)
+					print ("[Debug] MIX file entries: %d, Data segment: %d bytes" % (numOfEntriesToExport, allMixFileSize))
 				if allActualBytesInMixFile != 2 + 4 + 12 * numOfEntriesToExport + allMixFileSize:
-					print "[Error] MIX file size mismatch with reported size in header for %s!" % (tmpMIXfileName)
+					print ("[Error] MIX file size mismatch with reported size in header for %s!" % (tmpMIXfileName))
 				else:
 					#
 					# 12 bytes per entry
@@ -1062,7 +1062,7 @@ class grabberFromPNG:
 					#		4 bytes: Size of data
 					#
 					if gTraceModeEnabled:
-						print "[Debug] Checking for supported font file (FON) entries in MIX file..."
+						print ("[Debug] Checking for supported font file (FON) entries in MIX file...")
 
 					for i in range(0, numOfEntriesToExport):
 						foundFONFile = False
@@ -1086,7 +1086,7 @@ class grabberFromPNG:
 
 						if (foundFONFile == True):
 							if gTraceModeEnabled:
-								print "\n[Debug] Entry Name: %s, Entry ID: %s, Offset: %s, Data segment: %s bytes" % (currFonFileName, ''.join('{:08X}'.format(idOfMIXEntry)), ''.join('{:08X}'.format(offsetOfMIXEntry)),''.join('{:08X}'.format(sizeOfMIXEntry)))
+								print ("\n[Debug] Entry Name: %s, Entry ID: %s, Offset: %s, Data segment: %s bytes" % (currFonFileName, ''.join('{:08X}'.format(idOfMIXEntry)), ''.join('{:08X}'.format(offsetOfMIXEntry)),''.join('{:08X}'.format(sizeOfMIXEntry))))
 							#
 							# IF FON FILE:
 							# put file in FON object
@@ -1094,7 +1094,7 @@ class grabberFromPNG:
 							#
 							inMIXFile.seek(2 + 4 + 12*numOfEntriesToExport + offsetOfMIXEntry)
 							if(offsetOfMIXEntry + sizeOfMIXEntry > allMixFileSize):
-								print "[Error] Font file (FON) size mismatch with reported size in entry header!"
+								print ("[Error] Font file (FON) size mismatch with reported size in entry header!")
 							else:
 								fonFileBuffer = inMIXFile.read(sizeOfMIXEntry)
 								if (len(fonFileBuffer) == sizeOfMIXEntry):
@@ -1102,17 +1102,17 @@ class grabberFromPNG:
 									thisFonFile = fonFile(gTraceModeEnabled)
 									if (thisFonFile.loadFonFile(fonFileBuffer, allMixFileSize, currFonFileName)):
 										if gTraceModeEnabled:
-											print "[Debug] Font file (FON) %s was loaded successfully!" % (currFonFileName)
+											print ("[Debug] Font file (FON) %s was loaded successfully!" % (currFonFileName))
 										thisFonFile.outputFonToPNG()
 										totalFONs = totalFONs + 1
 									else:
-										print "[Error] Error while loading font file (FON) %s!" % (currFonFileName)
+										print ("[Error] Error while loading font file (FON) %s!" % (currFonFileName))
 								else:
-									print "[Error] Error while reading font file (FON) %s into mem buffer" % (''.join('{:08X}'.format(idOfMIXEntry)))
+									print ("[Error] Error while reading font file (FON) %s into mem buffer" % (''.join('{:08X}'.format(idOfMIXEntry))))
 
 				inMIXFile.close()
-				print "[Info] Total font files (FONs) processed: %d " % (totalFONs)
-				print "[Info] Done."
+				print ("[Info] Total font files (FONs) processed: %d " % (totalFONs))
+				print ("[Info] Done.")
 		return
 
 #
@@ -1140,41 +1140,41 @@ def main(argsCL):
 	TMPSpaceWidthInPixels = 10
 	#TMPdeductKerningPixels = 0
 	TMPcustomBaseLineOffset = 0
-	print "Running %s (%s)..." % (APP_NAME_SPACED, APP_VERSION)
+	print ("Running %s (%s)..." % (APP_NAME_SPACED, APP_VERSION))
 	#print "Len of sysargv = %s" % (len(argsCL))
 	if len(argsCL) == 2:
 		if(argsCL[1] == '--help'or argsCL[1] == '-h'):
-			print "%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION)
-			print APP_SHORT_DESC
-			print "Created by Praetorian of the classic adventures in Greek team."
-			print "Always keep backups!"
-			print "--------------------"
-			print "Preparatory steps:"
-			print "1. Put overrideEncoding.txt file in the same folder with this tool. (Recommended, but not obligatory step)"
-			print "--------------------"
-			print "Valid syntax A - export game fonts to PNG images:"
-			print "%s -ip folderpath_for_MIX_Files [--trace]\n" % (APP_WRAPPER_NAME)
-			print "Valid syntax B - create subtitle font:"
-			print "%s -im image_Row_PNG_Filename -om output_FON_filename -pxLL minSpaceBetweenLettersInRowLeftToLeft -pxTT minSpaceBetweenLettersInColumnTopToTop -pxKn kerningForFirstDummyFontLetter -pxWS whiteSpaceWidthInPixels [--noSpecialGlyphs] [--noAutoTabCalculation] [--trace]\n" % (APP_WRAPPER_NAME)    # deductKerningPixels"
-			print "The -ip switch has an argument that is the path for the input (MIX) files folder (can be the same as the Blade Runner installation folder)."
-			print "The -oe switch has an argument that is the input overrideEncoding file to use for the particular font creation."
-			print "The -im switch has an argument that is the input PNG image with a row of the font glyphs spaced apart."
-			print "The -om switch has an argument that is the output FON filename."
-			print "The -pxLL switch has an integer argument that specifies the minimum number of pixels between the left side of a glyph and the left side of the next glyph to its right in the line-row PNG."
-			print "The -pxTT switch has an integer argument that specifies the minimum number of pixels between the top side of a glyph and the top side of the glyph below (if there's a second row) in the row PNG. If there is only one row, this argument should still be set (as if there was another row) to define where the parser should stop checking for the limits of a glyph vertically."
-			print "The -pxKn switch has an integer argument that sets kerning for the first dummy font glyph."
-			print "The -pxYo switch has an integer argument that sets an offset to be added to all detected y offsets for the glyphs (except the special first one)."
-			print "The -pxWS switch has an integer argument that sets the white space width in pixels for this particular font."
-			print "The --noSpecialGlyphs switch removes consideration for special glyphs that exist out of their proper ascii order."
-			print "The --noAutoTabCalculation switch removes the detection of tab spacing between letters (use this switch if you didn't create the PNG row file using a tab spaced list of glyphs)."
-			print "The --trace switch enables more debug messages being printed during execution."
-			print "--------------------"
-			print "Thank you for using this app."
-			print "Please provide any feedback to: %s " % (COMPANY_EMAIL)
+			print ("%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION))
+			print (APP_SHORT_DESC)
+			print ("Created by Praetorian of the classic adventures in Greek team.")
+			print ("Always keep backups!")
+			print ("--------------------")
+			print ("Preparatory steps:")
+			print ("1. Put overrideEncoding.txt file in the same folder with this tool. (Recommended, but not obligatory step)")
+			print ("--------------------")
+			print ("Valid syntax A - export game fonts to PNG images:")
+			print ("%s -ip folderpath_for_MIX_Files [--trace]\n" % (APP_WRAPPER_NAME))
+			print ("Valid syntax B - create subtitle font:")
+			print ("%s -im image_Row_PNG_Filename -om output_FON_filename -pxLL minSpaceBetweenLettersInRowLeftToLeft -pxTT minSpaceBetweenLettersInColumnTopToTop -pxKn kerningForFirstDummyFontLetter -pxWS whiteSpaceWidthInPixels [--noSpecialGlyphs] [--noAutoTabCalculation] [--trace]\n" % (APP_WRAPPER_NAME))    # deductKerningPixels"
+			print ("The -ip switch has an argument that is the path for the input (MIX) files folder (can be the same as the Blade Runner installation folder).")
+			print ("The -oe switch has an argument that is the input overrideEncoding file to use for the particular font creation.")
+			print ("The -im switch has an argument that is the input PNG image with a row of the font glyphs spaced apart.")
+			print ("The -om switch has an argument that is the output FON filename.")
+			print ("The -pxLL switch has an integer argument that specifies the minimum number of pixels between the left side of a glyph and the left side of the next glyph to its right in the line-row PNG.")
+			print ("The -pxTT switch has an integer argument that specifies the minimum number of pixels between the top side of a glyph and the top side of the glyph below (if there's a second row) in the row PNG. If there is only one row, this argument should still be set (as if there was another row) to define where the parser should stop checking for the limits of a glyph vertically.")
+			print ("The -pxKn switch has an integer argument that sets kerning for the first dummy font glyph.")
+			print ("The -pxYo switch has an integer argument that sets an offset to be added to all detected y offsets for the glyphs (except the special first one).")
+			print ("The -pxWS switch has an integer argument that sets the white space width in pixels for this particular font.")
+			print ("The --noSpecialGlyphs switch removes consideration for special glyphs that exist out of their proper ascii order.")
+			print ("The --noAutoTabCalculation switch removes the detection of tab spacing between letters (use this switch if you didn't create the PNG row file using a tab spaced list of glyphs).")
+			print ("The --trace switch enables more debug messages being printed during execution.")
+			print ("--------------------")
+			print ("Thank you for using this app.")
+			print ("Please provide any feedback to: %s " % (COMPANY_EMAIL))
 			sys.exit()
 		elif(argsCL[1] == '--version' or argsCL[1] == '-v'):
-			print "%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION)
-			print "Please provide any feedback to: %s " % (COMPANY_EMAIL)
+			print ("%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION))
+			print ("Please provide any feedback to: %s " % (COMPANY_EMAIL))
 			sys.exit()
 		else:
 			invalidSyntax = True
@@ -1184,7 +1184,7 @@ def main(argsCL):
 				if (argsCL[i] == '-ip'):
 					TMPinputPathForMixFiles = argsCL[i+1]
 					exportFonMode = True
-					print "[Info] Original font file (FON) exporting mode enabled."
+					print ("[Info] Original font file (FON) exporting mode enabled.")
 				elif (argsCL[i] == '-oe'):
 					TMPOverrideEncodingFilePath = argsCL[i+1]
 				elif (argsCL[i] == '-im'):
@@ -1202,13 +1202,13 @@ def main(argsCL):
 				elif (argsCL[i] == '-pxWS'):
 					TMPSpaceWidthInPixels = int(argsCL[i+1])
 			elif argsCL[i] == '--noSpecialGlyphs':
-				print "[Info] No special out-of-order glyphs mode enabled."
+				print ("[Info] No special out-of-order glyphs mode enabled.")
 				TMPSpecialGlyphMode = False
 			elif argsCL[i] == '--noAutoTabCalculation':
-				print "[Info] No automatic tab calculation between glyphs."
+				print ("[Info] No automatic tab calculation between glyphs.")
 				TMPAutoTabCalculation = False
 			elif sys.argv[i] == '--trace':
-				print "[Info] Trace mode enabled (more debug messages)."
+				print ("[Info] Trace mode enabled (more debug messages).")
 				gTraceModeEnabled = True
 			elif argsCL[i][:1] == '-':
 				invalidSyntax = True
@@ -1247,18 +1247,18 @@ def main(argsCL):
 		invalidSyntax = True
 
 	if invalidSyntax == True:
-		print "[Error] Invalid syntax\n Try: \n %s --help for more info \n %s --version for version info " % (APP_WRAPPER_NAME, APP_WRAPPER_NAME)
-		print "Valid syntax A - export game fonts to PNG images:"
-		print "%s -ip folderpath_for_MIX_Files [--trace]\n" % (APP_WRAPPER_NAME)
-		print "Valid syntax B - create subtitle font:"
-		print "%s -im image_Row_PNG_Filename -om output_FON_filename -pxLL minSpaceBetweenLettersInRowLeftToLeft -pxTT minSpaceBetweenLettersInColumnTopToTop -pxKn kerningForFirstDummyFontLetter -pxWS whiteSpaceWidthInPixels [--noSpecialGlyphs] [--noAutoTabCalculation] [--trace]\n" % (APP_WRAPPER_NAME)    # deductKerningPixels"
-		print "\nDetected arguments:"
+		print ("[Error] Invalid syntax\n Try: \n %s --help for more info \n %s --version for version info " % (APP_WRAPPER_NAME, APP_WRAPPER_NAME))
+		print ("Valid syntax A - export game fonts to PNG images:")
+		print ("%s -ip folderpath_for_MIX_Files [--trace]\n" % (APP_WRAPPER_NAME))
+		print ("Valid syntax B - create subtitle font:")
+		print ("%s -im image_Row_PNG_Filename -om output_FON_filename -pxLL minSpaceBetweenLettersInRowLeftToLeft -pxTT minSpaceBetweenLettersInColumnTopToTop -pxKn kerningForFirstDummyFontLetter -pxWS whiteSpaceWidthInPixels [--noSpecialGlyphs] [--noAutoTabCalculation] [--trace]\n" % (APP_WRAPPER_NAME))    # deductKerningPixels"
+		print ("\nDetected arguments:")
 		tmpi = 0
 		for tmpArg in argsCL:
 			if tmpi==0: #skip first argument
 				tmpi+=1
 				continue
-			print "Argument: %s" % (tmpArg)
+			print ("Argument: %s" % (tmpArg))
 			tmpi+=1
 
 
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
index 21b8342f54c..4473801b7a2 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
@@ -24,77 +24,77 @@ datetimeLibFound = False
 try:
 	import os
 except ImportError:
-	print "[Error] os python library is required to be installed!"
+	print ("[Error] os python library is required to be installed!")
 else:
 	osLibFound = True
 
 try:
 	import sys
 except ImportError:
-	print "[Error] sys python library is required to be installed!"
+	print ("[Error] sys python library is required to be installed!")
 else:
 	sysLibFound = True
 
 try:
 	import shutil
 except ImportError:
-	print "[Error] Shutil python library is required to be installed!"
+	print ("[Error] Shutil python library is required to be installed!")
 else:
 	shutilLibFound = True
 
 try:
 	import ctypes
 except ImportError:
-	print "[Error] ctypes python library is required to be installed!"
+	print ("[Error] ctypes python library is required to be installed!")
 else:
 	ctypesLibFound = True
 
 try:
 	from datetime import datetime
 except ImportError:
-	print "[Error] datetime python library is required to be installed!"
+	print ("[Error] datetime python library is required to be installed!")
 else:
 	datetimeLibFound = True
 
 try:
 	import csv
 except ImportError:
-	print "[Error] csv python library is required to be installed!"
+	print ("[Error] csv python library is required to be installed!")
 else:
 	csvLibFound = True
 
 try:
 	import xlrd
 except ImportError:
-	print "[Error] xlrd python library is required to be installed!"
+	print ("[Error] xlrd python library is required to be installed!")
 else:
 	xlrdLibFound = True
 
 try:
 	import xlwt
 except ImportError:
-	print "[Error] xlwt python library is required to be installed!"
+	print ("[Error] xlwt python library is required to be installed!")
 else:
 	xlwtLibFound = True
 
 try:
 	from xlutils.copy import copy
 except ImportError:
-	print "[Error] xlutils python library is required to be installed!"
+	print ("[Error] xlutils python library is required to be installed!")
 else:
 	xlutilsLibFound = True
 
 try:
 	import re
 except ImportError:
-	print "[Error] re (Regular expression operations) python library is required to be installed!"
+	print ("[Error] re (Regular expression operations) python library is required to be installed!")
 else:
 	reLibFound = True
 
 try:
 	import struct
 except ImportError:
-	print "[Error] struct python library is required to be installed!"
+	print ("[Error] struct python library is required to be installed!")
 else:
 	structLibFound = True
 
@@ -215,21 +215,21 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 		configureFontsTranslationTextFile = u'configureFontsTranslation.txt'
 		relPath = u'.'
 		pathToConfigureFontsTranslationTxt = os.path.join(relPath, configureFontsTranslationTextFile)
-		print "[Warning] Font Translation Configuration file not found in arguments. Attempting to open local file %s if it exists" % (configureFontsTranslationTextFile)
+		print ("[Warning] Font Translation Configuration file not found in arguments. Attempting to open local file %s if it exists" % (configureFontsTranslationTextFile))
 
 	configureTranslationFailed = False
 	try:
 		if os.access(pathToConfigureFontsTranslationTxt, os.F_OK):
-			print "[Info] Font Translation Configuration file found: {0}".format(pathToConfigureFontsTranslationTxt)
+			print ("[Info] Font Translation Configuration file found: {0}".format(pathToConfigureFontsTranslationTxt))
 			conFontsTranslationFile = open(pathToConfigureFontsTranslationTxt, 'r')
 			linesLst = conFontsTranslationFile.readlines()
 			conFontsTranslationFile.close()
 			if linesLst is None or len(linesLst) == 0:
-				print '[Error] Empty configureFontsTranslation text file!'
+				print ('[Error] Empty configureFontsTranslation text file!')
 				configureTranslationFailed = True
 			else:
 				if gTraceModeEnabled:
-					print "[Debug] Parsing Font Translation Configuration file info..."
+					print ("[Debug] Parsing Font Translation Configuration file info...")
 				involvedTokensLst =[]
 				for readEncodLine in linesLst:
 					tmplineTokens = re.findall("[^\t\n]+",readEncodLine )
@@ -253,8 +253,8 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 								tmpFontCateg = fontCateg_targetEnc_OOOGlyphs_Tuple[0]
 								tmpTargetEncodingForThisFont = fontCateg_targetEnc_OOOGlyphs_Tuple[1]
 								if ( tmpFontCateg not in zip(*DEFAULT_TARGET_ENCODING_PER_FONT)[0]):
-									print '[Error] Invalid Font name specified in configureFontsTranslation text file!'
-									print '        Valid values are: ', ", ".join( zip(*DEFAULT_TARGET_ENCODING_PER_FONT)[0] )
+									print ('[Error] Invalid Font name specified in configureFontsTranslation text file!')
+									print ('        Valid values are: ', ", ".join( zip(*DEFAULT_TARGET_ENCODING_PER_FONT)[0] ))
 									configureTranslationFailed = True
 									break
 
@@ -274,7 +274,7 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 										if len(tokensOfTupleList) == 2:
 											tmpListOfOutOfOrderGlyphs.append( (unichr(ord(tokensOfTupleList[0])), unichr(ord(tokensOfTupleList[1])))  )
 										else:
-											print '[Error] Bad tuple syntax in configureFontsTranslation text file!'
+											print ('[Error] Bad tuple syntax in configureFontsTranslation text file!')
 											configureTranslationFailed = True
 
 									if not configureTranslationFailed \
@@ -283,7 +283,7 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 									elif configureTranslationFailed:
 										break
 							else:
-								print '[Error] Bad line syntax in configureFontsTranslation text file!'
+								print ('[Error] Bad line syntax in configureFontsTranslation text file!')
 								configureTranslationFailed = True
 								break
 					except:
@@ -301,20 +301,20 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 
 					if len(gTargetEncodingPerFont) != len(DEFAULT_TARGET_ENCODING_PER_FONT):
 						# should never happen
-						print '[Error] Failed to populate internal target encoding per font structure!'
+						print ('[Error] Failed to populate internal target encoding per font structure!')
 						configureTranslationFailed = True
 					else:
 						if gTraceModeEnabled:
-							print '[Debug] My encodings list: ', gTargetEncodingPerFont
+							print ('[Debug] My encodings list: ', gTargetEncodingPerFont)
 						configureTranslationFailed = False
 
 	except:
-		print "[Error] while trying to access file for Font Translation Configuration info: %s" % (pathToConfigureFontsTranslationTxt)
+		print ("[Error] while trying to access file for Font Translation Configuration info: %s" % (pathToConfigureFontsTranslationTxt))
 		raise
 		configureTranslationFailed = True
 
 	if 	configureTranslationFailed == True:
-		print "[Error] Could not find proper Font Translation Configuration info in: %s" % (pathToConfigureFontsTranslationTxt)
+		print ("[Error] Could not find proper Font Translation Configuration info in: %s" % (pathToConfigureFontsTranslationTxt))
 		sys.exit(1)	# terminate if override Failed (Blade Runner)
 	#
 	#
@@ -329,7 +329,7 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 	#	tmplistOfOutOfOrderGlyphs.append((u'\xe9', u'\xa7')) # e for (liver) pate
 	#	gListOfFontNamesToOutOfOrderGlyphs.append( (tmpFontType, tmplistOfOutOfOrderGlyphs))
 	if gTraceModeEnabled:
-		print "[Info] Explicit Out Of Order Glyphs List: " , gListOfFontNamesToOutOfOrderGlyphs
+		print ("[Info] Explicit Out Of Order Glyphs List: " , gListOfFontNamesToOutOfOrderGlyphs)
 	# arrange list properly:
 	# check if the list contains same item as key and value (in different pairs)
 	# if such case then the pair with the key should precede the pair with the value matched,
@@ -353,7 +353,7 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 					break # the whole while loop
 			gArrangedListOfFontNamesToOutOfOrderGlyphs.append( ( itFontName, itOOOGlyphList))
 	if gTraceModeEnabled:
-		print "[Debug] Arranged Glyphs Delegates List: " , gArrangedListOfFontNamesToOutOfOrderGlyphs
+		print ("[Debug] Arranged Glyphs Delegates List: " , gArrangedListOfFontNamesToOutOfOrderGlyphs)
 	return
 
 #
@@ -369,10 +369,10 @@ def initActorPropertyEntries(thePathToActorNamesTxt):
 		actorNamesTextFile = u'actornames.txt'
 		relPath = u'.'
 		thePathToActorNamesTxt = os.path.join(relPath, actorNamesTextFile)
-		print "[Warning] Actor names text file %s not found in arguments. Attempting to open local file if it exists" % (thePathToActorNamesTxt)
+		print ("[Warning] Actor names text file %s not found in arguments. Attempting to open local file if it exists" % (thePathToActorNamesTxt))
 
 	if os.access(thePathToActorNamesTxt, os.F_OK):
-		print "[Info] Actor names text file found: {0}".format(thePathToActorNamesTxt)
+		print ("[Info] Actor names text file found: {0}".format(thePathToActorNamesTxt))
 
 		with open(thePathToActorNamesTxt) as tsv:
 			for line in csv.reader(tsv, dialect="excel-tab"):
@@ -387,7 +387,7 @@ def initActorPropertyEntries(thePathToActorNamesTxt):
 		tsv.close()
 	else:
 		## error
-		print "[Error] Actor names text file not found: {0}".format(thePathToActorNamesTxt)
+		print ("[Error] Actor names text file not found: {0}".format(thePathToActorNamesTxt))
 		sys.exit(1)	# terminate if finding actor names file failed (Blade Runner)
 
 def getActorShortNameById(lookupActorId):
@@ -443,7 +443,7 @@ def calculateFoldHash(strFileName):
 		hash = ((hash << 1) | ((hash >> 31) & 1)) + groupSum
 	hash &= 0xFFFFFFFF	   # mask here!
 	if gTraceModeEnabled:
-		print '[Debug] ', (strParam +': '  +''.join('{:08X}'.format(hash)))
+		print ('[Debug] ', (strParam +': '  +''.join('{:08X}'.format(hash))))
 	return hash
 
 #
@@ -492,7 +492,7 @@ def getSupportedTranslatedTrxFilenamesList():
 #
 def outputMIX():
 	# output file should be DEFAULT_SUBTITLES_MIX_OUTPUT_NAME
-	print "[Info] Writing to output MIX file: %s..." % (DEFAULT_SUBTITLES_MIX_OUTPUT_NAME)
+	print ("[Info] Writing to output MIX file: %s..." % (DEFAULT_SUBTITLES_MIX_OUTPUT_NAME))
 
 	errorFound = False
 	outMIXFile = None
@@ -502,7 +502,7 @@ def outputMIX():
 		outMIXFile = open(outputMixPath, 'wb')
 	except Exception as e:
 		errorFound = True
-		print '[Error] Unable to write to output MIX file. ' + str(e)
+		print ('[Error] Unable to write to output MIX file. ' + str(e))
 	if not errorFound:
 		# Write header
 		# 2 bytes: number of entries (NumFiles)
@@ -537,8 +537,8 @@ def outputMIX():
 		mergedListOfSupportedSubtitleSheets = getSupportedSubtitleSheetsList()
 
 		if gTraceModeEnabled:
-			print "[Trace] mergedListOfSupportedSubtitleSheets="
-			print mergedListOfSupportedSubtitleSheets
+			print ("[Trace] mergedListOfSupportedSubtitleSheets=")
+			print (mergedListOfSupportedSubtitleSheets)
 
 		for sheetDialogueName in mergedListOfSupportedSubtitleSheets:
 			sheetDialogueNameTRx = sheetDialogueName
@@ -607,8 +607,8 @@ def outputMIX():
 				break
 
 		outMIXFile.close()
-		print "[Info] Total Resource files packed in %s: %d" % (DEFAULT_SUBTITLES_MIX_OUTPUT_NAME, numOfFiles)
-		print "[Info] Done."
+		print ("[Info] Total Resource files packed in %s: %d" % (DEFAULT_SUBTITLES_MIX_OUTPUT_NAME, numOfFiles))
+		print ("[Info] Done.")
 	return
 #
 # END FOR MIX FILE
@@ -685,7 +685,7 @@ def translateQuoteToAsciiProper(cellObj, pSheetName):
 	try:
 		newQuoteReplaceSpecialsRetStr = newQuoteReplaceSpecials.encode(localTargetEncoding)
 	except Exception as e:
-		print "[Error] Could not encode text in " + localTargetEncoding + "::" + str(e)
+		print ("[Error] Could not encode text in " + localTargetEncoding + "::" + str(e))
 		newQuoteReplaceSpecialsRetStr = "??????????"
 	#try:
 	#	newQuoteReplaceSpecialsRetStr = newQuoteReplaceSpecials.encode(localTargetEncoding)
@@ -707,8 +707,8 @@ def parseIntCellValue(cell_obj_value, row_idx, col_idx, xl_sheet_name, xl_sheet_
 	try:
 		retCandValue =	int(cell_obj_value)
 	except Exception as e:
-		print "\n[Error] Invalid cell value at row: %d, column: %d in sheet: %s (rows: %d, columns: %d)" %(row_idx+1, col_idx+1, xl_sheet_name, xl_sheet_nrows, xl_sheet_ncols)
-		print "\tPlease check for redundant empty rows or invalid cell values.\n"
+		print ("\n[Error] Invalid cell value at row: %d, column: %d in sheet: %s (rows: %d, columns: %d)" %(row_idx+1, col_idx+1, xl_sheet_name, xl_sheet_nrows, xl_sheet_ncols))
+		print ("\tPlease check for redundant empty rows or invalid cell values.\n")
 		sys.exit()
 	return retCandValue
 
@@ -725,18 +725,18 @@ def inputXLS(pathtoInputExcelFilename):
 	# Check if no extension or invalid extension
 	if excelFileExtension is None \
 			and not (excelFileExtension.lower() == "xls" or excelFileExtension.lower() == "xlsx"):
-		print "[Error] Bad file extension found for the Excel input file %s. Supported extensions are '.xls' and 'xlsx'" % (excelFileExtension, pathtoInputExcelFilename)
+		print ("[Error] Bad file extension found for the Excel input file %s. Supported extensions are '.xls' and 'xlsx'" % (excelFileExtension, pathtoInputExcelFilename))
 		sys.exit(1) # Terminate if the input Excel had unsupported extension (or none)
 
 	try:
 		xl_workbook = xlrd.open_workbook(pathtoInputExcelFilename, encoding_override="utf-8")
 		if xl_workbook is not None:
-			print "[Info] Opened Excel input file: %s" % (pathtoInputExcelFilename)
+			print ("[Info] Opened Excel input file: %s" % (pathtoInputExcelFilename))
 	except Exception as e:
-		print '[Error] Could not open the Excel input file: '  + str(e)
+		print ('[Error] Could not open the Excel input file: '  + str(e))
 
 	if xl_workbook is None:
-		print '[Error] Giving up. Could not open the specified Excel input file.'
+		print ('[Error] Giving up. Could not open the specified Excel input file.')
 		sys.exit(1) # Terminate if the input Excel was not found
 	# List sheet names, and pull a sheet by name
 	#
@@ -765,16 +765,16 @@ def inputXLS(pathtoInputExcelFilename):
 	xl_sheet = None
 	try:
 		if gTraceModeEnabled:
-			print '[Debug] Checking for existence of sheet: ' + SUPPORTED_DIALOGUE_VERSION_SHEET
+			print ('[Debug] Checking for existence of sheet: ' + SUPPORTED_DIALOGUE_VERSION_SHEET)
 		xl_sheet = xl_workbook.sheet_by_name(SUPPORTED_DIALOGUE_VERSION_SHEET)
 	except Exception as e:
 		if gTraceModeEnabled:
-			print '[Debug] Could not open requested sheet: ' + SUPPORTED_DIALOGUE_VERSION_SHEET + ' in Excel::' + str(e)
+			print ('[Debug] Could not open requested sheet: ' + SUPPORTED_DIALOGUE_VERSION_SHEET + ' in Excel::' + str(e))
 
 	if xl_sheet is None:
 		# we didn't find a sheet for version info, so we should auto-create a Sheet for it
 		if gTraceModeEnabled:
-			print '[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_DIALOGUE_VERSION_SHEET)
+			print ('[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_DIALOGUE_VERSION_SHEET))
 		sbtlVersTRInstance = sbtlVersTextResource(gTraceModeEnabled)
 		bookCopy = copy(xl_workbook)
 		xl_sheet = bookCopy.add_sheet(SUPPORTED_DIALOGUE_VERSION_SHEET)
@@ -799,17 +799,17 @@ def inputXLS(pathtoInputExcelFilename):
 					# We assume utf-8 charset (since we get the text from a python script)
 					objUTF8Unicode = unicode(objStr, 'utf-8')
 				except Exception as e:
-					print '[Error] Failed to create unicode string: ' + str(e)
+					print ('[Error] Failed to create unicode string: ' + str(e))
 					objUTF8Unicode = unicode("???", 'utf-8')
 				xl_sheet.write(m, i1, objUTF8Unicode)
 		try:
 			bookCopy.save(pathtoInputExcelFilename)
 		except Exception as e:
-			print "[Error] Giving up: Could not save to output Excel file:: " + str(e)
+			print ("[Error] Giving up: Could not save to output Excel file:: " + str(e))
 			sys.exit(1) # Terminate if we couldn't write to output Excel file
 
 		if gTraceModeEnabled:
-			print '[Debug] Sheet: %s was created successfully.' % (SUPPORTED_DIALOGUE_VERSION_SHEET)
+			print ('[Debug] Sheet: %s was created successfully.' % (SUPPORTED_DIALOGUE_VERSION_SHEET))
 		inputXLS(pathtoInputExcelFilename)
 		return
 	# end of check for a version info sheet
@@ -818,16 +818,16 @@ def inputXLS(pathtoInputExcelFilename):
 	xl_sheet = None
 	try:
 		if gTraceModeEnabled:
-			print '[Debug] Checking for existence of sheet: ' + SUPPORTED_EX_CR_SHEET
+			print ('[Debug] Checking for existence of sheet: ' + SUPPORTED_EX_CR_SHEET)
 		xl_sheet = xl_workbook.sheet_by_name(SUPPORTED_EX_CR_SHEET)
 	except Exception as e:
 		if gTraceModeEnabled:
-			print '[Debug] Could not open requested sheet: ' + SUPPORTED_EX_CR_SHEET + ' in Excel::' + str(e)
+			print ('[Debug] Could not open requested sheet: ' + SUPPORTED_EX_CR_SHEET + ' in Excel::' + str(e))
 
 	if xl_sheet is None:
 		# we didn't find a sheet for extra info, so we should auto-create a Sheet for it
 		if gTraceModeEnabled:
-			print '[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_EX_CR_SHEET)
+			print ('[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_EX_CR_SHEET))
 		excrTRInstance = extracTextResource(gTraceModeEnabled)
 		bookCopy = copy(xl_workbook)
 		xl_sheet = bookCopy.add_sheet(SUPPORTED_EX_CR_SHEET)
@@ -852,34 +852,34 @@ def inputXLS(pathtoInputExcelFilename):
 					# We assume utf-8 charset (since we get the text from a python script)
 					objUTF8Unicode = unicode(objStr, 'utf-8')
 				except Exception as e:
-					print '[Error] Failed to create unicode string: ' + str(e)
+					print ('[Error] Failed to create unicode string: ' + str(e))
 					objUTF8Unicode = unicode("???", 'utf-8')
 				xl_sheet.write(m, i1, objUTF8Unicode)
 		try:
 			bookCopy.save(pathtoInputExcelFilename)
 		except Exception as e:
-			print "[Error] Giving up: Could not save to output Excel file:: " + str(e)
+			print ("[Error] Giving up: Could not save to output Excel file:: " + str(e))
 			sys.exit(1) # Terminate if we couldn't write to output Excel file
 
 		if gTraceModeEnabled:
-			print '[Debug] Sheet: %s was created successfully.' % (SUPPORTED_EX_CR_SHEET)
+			print ('[Debug] Sheet: %s was created successfully.' % (SUPPORTED_EX_CR_SHEET))
 		inputXLS(pathtoInputExcelFilename)
 		return
 	# end of check for a extra info sheet
 
 	if gTraceModeEnabled:
-		print '[Debug] mergedListOfSupportedSubtitleSheetsAndTranslatedTREs: ', mergedListOfSupportedSubtitleSheetsAndTranslatedTREs
+		print ('[Debug] mergedListOfSupportedSubtitleSheetsAndTranslatedTREs: ', mergedListOfSupportedSubtitleSheetsAndTranslatedTREs)
 	for sheetDialogueName in mergedListOfSupportedSubtitleSheetsAndTranslatedTREs:
 		xl_sheet = None
 		try:
 			xl_sheet = xl_workbook.sheet_by_name(sheetDialogueName)
 		except Exception as e:
 			if gTraceModeEnabled:
-				print '[Debug] Could not open requested sheet: ' + sheetDialogueName + ' in Excel::' + str(e)
+				print ('[Debug] Could not open requested sheet: ' + sheetDialogueName + ' in Excel::' + str(e))
 
 		if xl_sheet is None:
 			if (not gTraceModeEnabled) and (sheetDialogueName not in supportedTranslatedTrxFilenamesList):
-				print '[Warning] %s sheet was not found in input Excel file.' % (sheetDialogueName)
+				print ('[Warning] %s sheet was not found in input Excel file.' % (sheetDialogueName))
 
 		if xl_sheet is not None:
 			if gTraceModeEnabled:
@@ -912,11 +912,11 @@ def inputXLS(pathtoInputExcelFilename):
 
 			if xl_sheet.name in supportedInGameQuotesSheetsList:
 				if gTraceModeEnabled:
-					print '[Debug] IN GAME QUOTES'
+					print ('[Debug] IN GAME QUOTES')
 				mode = 1 #in-game quote
 			elif xl_sheet.name in mergedListOfSupportedSubtitleSheets:
 				if gTraceModeEnabled:
-					print '[Debug] VQA SCENE DIALOGUE'
+					print ('[Debug] VQA SCENE DIALOGUE')
 				mode = 2 #VQA
 				# check if the VQA sheets are of the old format or the new format
 				cell_obj = xl_sheet.cell(1, 0)
@@ -924,7 +924,7 @@ def inputXLS(pathtoInputExcelFilename):
 					vqaSheetFormatVersion = 1
 			elif xl_sheet.name in supportedTranslatedTrxFilenamesList:
 				if gTraceModeEnabled:
-					print '[Debug] TRANSLATED TEXT RESOURCE'
+					print ('[Debug] TRANSLATED TEXT RESOURCE')
 				mode = 3 # Translated TRE
 			#
 			del gTableOfStringIds[:]
@@ -1048,9 +1048,9 @@ def inputXLS(pathtoInputExcelFilename):
 
 			gTableOfStringOffsets.append(curStrStartOffset) # the final extra offset entry
 			if gTraceModeEnabled:
-				print '[Debug] Longest Length: %d, Quotes above threshold (%d): %d' % (longestLength, predefinedLengthThreshold, quoteNumAboveThreshold)
+				print ('[Debug] Longest Length: %d, Quotes above threshold (%d): %d' % (longestLength, predefinedLengthThreshold, quoteNumAboveThreshold))
 				for extremQuotTuple in extremeQuotesList:
-					print "[Debug] Id: %d, Q: %s" % (extremQuotTuple[0], extremQuotTuple[1])
+					print ("[Debug] Id: %d, Q: %s" % (extremQuotTuple[0], extremQuotTuple[1]))
 			#
 			# WRITE TO TRE FILE
 			#
@@ -1104,8 +1104,8 @@ def getLanguageDescCodeTuple(candidateLangDescriptionStr):
 
 def printInfoMessageForLanguageSelectionSyntax():
 	tmpCSVSupportedLangDescValues = ", ".join( zip(*SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST)[0] )
-	print "Valid values for language selection are: %s" % (tmpCSVSupportedLangDescValues)
-	print "Default value is: %s (%s)" % (DEFAULT_LANG_DESC_CODE[0], DEFAULT_LANG_DESC_CODE[2])
+	print ("Valid values for language selection are: %s" % (tmpCSVSupportedLangDescValues))
+	print ("Default value is: %s (%s)" % (DEFAULT_LANG_DESC_CODE[0], DEFAULT_LANG_DESC_CODE[2]))
 	return
 #
 #
@@ -1130,39 +1130,39 @@ def main(argsCL):
 	candidateLangDescriptionTxt = ""
 
 	invalidSyntax = False
-	print "Running %s (%s)..." % (APP_NAME_SPACED, APP_VERSION)
+	print ("Running %s (%s)..." % (APP_NAME_SPACED, APP_VERSION))
 	#print "Len of sysargv = %s" % (len(argsCL))
 	if len(argsCL) == 2:
 		if(argsCL[1] == '--help'or argsCL[1] == '-h'):
-			print "%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION)
-			print APP_SHORT_DESC
-			print "Created by Praetorian of the classic adventures in Greek team."
-			print "Always keep backups!"
-			print "--------------------"
-			print "Preparatory steps:"
-			print "1. Copy the transcript Excel file (eg. BladeRunnerPCTLK.xlsx, latest version, downloaded from Google Sheets) in some folder on your PC."
-			print "--------------------"
-			print "%s takes 1 mandatory argument:" % (APP_WRAPPER_NAME)
-			print "Valid syntax: "
-			print "%s -x path_to_BladeRunnerPCTLK_xlsx [-ian path_to_actornames_txt] [-cft path_to_configureFontsTranslation_txt] [-ld gameInputLanguageDescription] [--trace]" % (APP_WRAPPER_NAME)
-			print "-x is followed by the path to the excel file with the subtitle quotes."
-			print "-ian is followed by the path to actornames.txt, if it's not in the current working directory."
-			print "-cft is followed by the path to configureFontsTranslation.txt, if it's not in the current working directory."
-			print "-ld is followed by the language description of the target game version that you will install the subtitles to."
+			print ("%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION))
+			print (APP_SHORT_DESC)
+			print ("Created by Praetorian of the classic adventures in Greek team.")
+			print ("Always keep backups!")
+			print ("--------------------")
+			print ("Preparatory steps:")
+			print ("1. Copy the transcript Excel file (eg. BladeRunnerPCTLK.xlsx, latest version, downloaded from Google Sheets) in some folder on your PC.")
+			print ("--------------------")
+			print ("%s takes 1 mandatory argument:" % (APP_WRAPPER_NAME))
+			print ("Valid syntax: ")
+			print ("%s -x path_to_BladeRunnerPCTLK_xlsx [-ian path_to_actornames_txt] [-cft path_to_configureFontsTranslation_txt] [-ld gameInputLanguageDescription] [--trace]" % (APP_WRAPPER_NAME))
+			print ("-x is followed by the path to the excel file with the subtitle quotes.")
+			print ("-ian is followed by the path to actornames.txt, if it's not in the current working directory.")
+			print ("-cft is followed by the path to configureFontsTranslation.txt, if it's not in the current working directory.")
+			print ("-ld is followed by the language description of the target game version that you will install the subtitles to.")
 			printInfoMessageForLanguageSelectionSyntax()
-			print "The --trace switch enables more debug messages being printed during execution."
-			print "--------------------"
-			print "If the app finishes successfully, it creates a %sx file and a few other Text Resource (TRx) files " % (SUPPORTED_INGAME_DIALOGUE_SHEETS[0])
-			print "for each VQAs sheet in the input Excel file respectively. Additionally, a %s file containing all " % (DEFAULT_SUBTITLES_MIX_OUTPUT_NAME)
-			print "of the resources in the Excel file and a few extra (subtitle font, (optional) edited fonts) is created as well."
-			print "All output files are written in the current working directory."
-			print "--------------------"
-			print "Thank you for using this app."
-			print "Please provide any feedback to: %s " % (COMPANY_EMAIL)
+			print ("The --trace switch enables more debug messages being printed during execution.")
+			print ("--------------------")
+			print ("If the app finishes successfully, it creates a %sx file and a few other Text Resource (TRx) files " % (SUPPORTED_INGAME_DIALOGUE_SHEETS[0]))
+			print ("for each VQAs sheet in the input Excel file respectively. Additionally, a %s file containing all " % (DEFAULT_SUBTITLES_MIX_OUTPUT_NAME))
+			print ("of the resources in the Excel file and a few extra (subtitle font, (optional) edited fonts) is created as well.")
+			print ("All output files are written in the current working directory.")
+			print ("--------------------")
+			print ("Thank you for using this app.")
+			print ("Please provide any feedback to: %s " % (COMPANY_EMAIL))
 			sys.exit()
 		elif(argsCL[1] == '--version' or argsCL[1] == '-v'):
-			print "%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION)
-			print "Please provide any feedback to: %s " % (COMPANY_EMAIL)
+			print ("%s %s supports Westwood's Blade Runner PC Game (1997)." % (APP_NAME_SPACED, APP_VERSION))
+			print ("Please provide any feedback to: %s " % (COMPANY_EMAIL))
 			sys.exit()
 		else:
 			invalidSyntax = True
@@ -1178,7 +1178,7 @@ def main(argsCL):
 				elif (argsCL[i] == '-ld'):
 					candidateLangDescriptionTxt = argsCL[i+1]
 			elif sys.argv[i] == '--trace':
-				print "[Info] Trace mode enabled (more debug messages)."
+				print ("[Info] Trace mode enabled (more debug messages).")
 				gTraceModeEnabled = True
 			elif argsCL[i][:1] == '-':
 				invalidSyntax = True
@@ -1189,21 +1189,21 @@ def main(argsCL):
 
 		gActiveLanguageDescriptionCodeTuple = getLanguageDescCodeTuple(candidateLangDescriptionTxt)
 		if (not invalidSyntax) and gActiveLanguageDescriptionCodeTuple is None:
-			print "[Error] Invalid language code was specified"
+			print ("[Error] Invalid language code was specified")
 			printInfoMessageForLanguageSelectionSyntax()
 			invalidSyntax = True
 
 		if not invalidSyntax:
-			print "[Info] Game Language Selected: %s (%s)" % (gActiveLanguageDescriptionCodeTuple[0], gActiveLanguageDescriptionCodeTuple[2])
+			print ("[Info] Game Language Selected: %s (%s)" % (gActiveLanguageDescriptionCodeTuple[0], gActiveLanguageDescriptionCodeTuple[2]))
 			#
 			# Early check for external subtitles font file, since we no longer support internal font
 			relPath = u'.'
 			thePathToExternalFontFileFon = os.path.join(relPath, DEFAULT_SUBTITLES_FONT_NAME)
 			if not os.path.isfile(thePathToExternalFontFileFon):
-				print "[Error] Font file %s for subtitles was not found!" % (thePathToExternalFontFileFon)
+				print ("[Error] Font file %s for subtitles was not found!" % (thePathToExternalFontFileFon))
 				sys.exit(1)
 			else:
-				print "[Info] Supported font file for subtitles found: {0}".format(thePathToExternalFontFileFon)
+				print ("[Info] Supported font file for subtitles found: {0}".format(thePathToExternalFontFileFon))
 
 			# parse any overrideEncoding file if exists:
 			initOverrideEncoding(pathToConfigureFontsTranslationTxt)
@@ -1213,7 +1213,7 @@ def main(argsCL):
 			initActorPropertyEntries(pathToActorNamesTxt)
 			#if gTraceModeEnabled:
 			#	for actorEntryTmp in gActorPropertyEntries:
-			#		print "[Debug] Found actor: %s %s %s" % (actorEntryTmp[0], actorEntryTmp[1], actorEntryTmp[2])
+			#		print ("[Debug] Found actor: %s %s %s" % (actorEntryTmp[0], actorEntryTmp[1], actorEntryTmp[2]))
 			inputXLS(pathToQuoteExcelFile)
 			outputMIX()
 
@@ -1221,16 +1221,16 @@ def main(argsCL):
 		invalidSyntax = True
 
 	if invalidSyntax == True:
-		print "[Error] Invalid syntax\n Try: \n %s --help for more info \n %s --version for version info " % (APP_WRAPPER_NAME, APP_WRAPPER_NAME)
-		print "Valid syntax: "
-		print "%s -x path_to_BladeRunnerPCTLK_xlsx [-ian path_to_actornames_txt] [-cft path_to_configureFontsTranslation_txt] [-ld gameInputLanguageDescription] [--trace]" % (APP_WRAPPER_NAME)
-		print "\nDetected arguments:"
+		print ("[Error] Invalid syntax\n Try: \n %s --help for more info \n %s --version for version info " % (APP_WRAPPER_NAME, APP_WRAPPER_NAME))
+		print ("Valid syntax: ")
+		print ("%s -x path_to_BladeRunnerPCTLK_xlsx [-ian path_to_actornames_txt] [-cft path_to_configureFontsTranslation_txt] [-ld gameInputLanguageDescription] [--trace]" % (APP_WRAPPER_NAME))
+		print ("\nDetected arguments:")
 		tmpi = 0
 		for tmpArg in argsCL:
 			if tmpi==0: #skip first argument
 				tmpi+=1
 				continue
-			print "Argument: %s" % (tmpArg)
+			print ("Argument: %s" % (tmpArg))
 			tmpi+=1
 
 # Total unique quotes seems to be 5495!


Commit: 917559e34987e68a76e442a4234779224c0abf1b
    https://github.com/scummvm/scummvm/commit/917559e34987e68a76e442a4234779224c0abf1b
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Fix import of errno in Python 3

Changed paths:
    devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py


diff --git a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
index 800e18b9c5a..c40c7bf73a4 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
@@ -124,7 +124,12 @@ if 	(not osLibFound) \
 	sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
 	sys.exit(1)
 
-from os import walk, errno, path
+try:
+	import errno
+except ImportError:
+	from os import errno
+
+from os import walk, path
 from struct import *
 from fonFileLib import *
 


Commit: 4c8251c40c31cca9813f8e82ff81e9dd17419039
    https://github.com/scummvm/scummvm/commit/4c8251c40c31cca9813f8e82ff81e9dd17419039
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Fix missing spaces and tabs mix

Changed paths:
    devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py


diff --git a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
index c40c7bf73a4..1e1cb7ec895 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
@@ -467,7 +467,7 @@ class grabberFromPNG:
 		return
 
 	def setOverrideEncodingPath(self, pOverrideEncodingPath):
- 		self.overrideEncodingPath = pOverrideEncodingPath
+		self.overrideEncodingPath = pOverrideEncodingPath
 		return
 
 ##


Commit: 8bb7e87fd54535ca49c0a912dba45526b449d975
    https://github.com/scummvm/scummvm/commit/8bb7e87fd54535ca49c0a912dba45526b449d975
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Add missing list(zip

Changed paths:
    devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py


diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
index 4473801b7a2..0f7de6c1fe0 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
@@ -252,14 +252,14 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 									and fontCateg_targetEnc_OOOGlyphs_Tuple[1] != ''):
 								tmpFontCateg = fontCateg_targetEnc_OOOGlyphs_Tuple[0]
 								tmpTargetEncodingForThisFont = fontCateg_targetEnc_OOOGlyphs_Tuple[1]
-								if ( tmpFontCateg not in zip(*DEFAULT_TARGET_ENCODING_PER_FONT)[0]):
+								if ( tmpFontCateg not in list(zip(*DEFAULT_TARGET_ENCODING_PER_FONT))[0]):
 									print ('[Error] Invalid Font name specified in configureFontsTranslation text file!')
-									print ('        Valid values are: ', ", ".join( zip(*DEFAULT_TARGET_ENCODING_PER_FONT)[0] ))
+									print ('        Valid values are: ', ", ".join( list(zip(*DEFAULT_TARGET_ENCODING_PER_FONT))[0] ))
 									configureTranslationFailed = True
 									break
 
 								elif len(gTargetEncodingPerFont) == 0 \
-									or (tmpFontCateg not in zip(*gTargetEncodingPerFont)[0]):
+									or (tmpFontCateg not in list(zip(*gTargetEncodingPerFont))[0]):
 									gTargetEncodingPerFont.append(  ( tmpFontCateg,  tmpTargetEncodingForThisFont) )
 
 								if ( fontCateg_targetEnc_OOOGlyphs_Tuple[2] is not None \
@@ -295,7 +295,7 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 				if (configureTranslationFailed == False):
 					for tmpFontToTargetEncCateg in DEFAULT_TARGET_ENCODING_PER_FONT:
 						if (len (gTargetEncodingPerFont) == 0 \
-							or  tmpFontToTargetEncCateg[0] not in zip(*gTargetEncodingPerFont)[0]):
+							or  tmpFontToTargetEncCateg[0] not in list(zip(*gTargetEncodingPerFont))[0]):
 							# append the defaults for the mappings not explicitly specified in configureFontsTranslation
 							gTargetEncodingPerFont.append(tmpFontToTargetEncCateg)
 
@@ -1103,7 +1103,7 @@ def getLanguageDescCodeTuple(candidateLangDescriptionStr):
 	return resultTuple
 
 def printInfoMessageForLanguageSelectionSyntax():
-	tmpCSVSupportedLangDescValues = ", ".join( zip(*SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST)[0] )
+	tmpCSVSupportedLangDescValues = ", ".join( list(zip(*SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST))[0] )
 	print ("Valid values for language selection are: %s" % (tmpCSVSupportedLangDescValues))
 	print ("Default value is: %s (%s)" % (DEFAULT_LANG_DESC_CODE[0], DEFAULT_LANG_DESC_CODE[2]))
 	return


Commit: a863683a75143e0610c41c3e006be45d40118383
    https://github.com/scummvm/scummvm/commit/a863683a75143e0610c41c3e006be45d40118383
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Add and use comp unicode python wrappers

Changed paths:
  A devtools/create_bladerunner/subtitles/common/pythonCompat.py
    devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
    devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py


diff --git a/devtools/create_bladerunner/subtitles/common/pythonCompat.py b/devtools/create_bladerunner/subtitles/common/pythonCompat.py
new file mode 100644
index 00000000000..130aa838ebc
--- /dev/null
+++ b/devtools/create_bladerunner/subtitles/common/pythonCompat.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+
+def makeUnicode(inp):
+        if sys.version_info[0] <= 2:
+                return unicode(inp, 'utf-8')
+        else:
+                return inp
+
+def makeAscii(inp):
+        if sys.version_info[0] <= 2:
+                return inp
+        else:
+                return inp.encode('ascii')
+
+def unicodeEncode(inp, enc):
+        if sys.version_info[0] <= 2:
+                return unicode.encode(inp, enc)
+        else:
+                return inp.encode(enc)
+
+def encodedSplit(s, spl):
+        if sys.version_info[0] <= 2:
+                return s.split(spl)
+        elif isinstance(spl, bytes):
+                return s.split(spl)
+        else:
+                return s.split(spl.encode('ascii'))
+
+def getUnicodeSym(s):
+        if sys.version_info[0] <= 2:
+                return unichr(ord(s))
+        return s
+
+def makeToBytes(s):
+	if sys.version_info[0] <= 2:
+		return [ord(i) for i in s]
+	return bytes(i for i in s)
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
index 1e1cb7ec895..66d1575b22e 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/grabberFromPNG17BR.py
@@ -129,9 +129,14 @@ try:
 except ImportError:
 	from os import errno
 
+pathToParent = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
+pathToCommon = os.path.join(pathToParent, "common")
+sys.path.append(pathToCommon)
+
 from os import walk, path
 from struct import *
 from fonFileLib import *
+from pythonCompat import *
 
 COMPANY_EMAIL = "classic.adventures.in.greek at gmail.com"
 APP_VERSION = "1.10"
@@ -172,10 +177,8 @@ class grabberFromPNG:
 	origEncoding = 'windows-1252'
 	defaultTargetLang = "greek"
 	defaultTargetEncoding = 'windows-1253' #greek
-	defaultTargetEncodingUnicode = unicode(defaultTargetEncoding, 'utf-8')
 
 	targetEncoding = 'windows-1253'
-	targetEncodingUnicode = unicode(targetEncoding, 'utf-8')
 
 	overrideEncodingPath = ""
 	originalFontName = ''
@@ -264,35 +267,34 @@ class grabberFromPNG:
 					nameKeyTupl = tokenNameKeyPair.split('=', 1)
 					try:
 						if len(nameKeyTupl) == 2 and nameKeyTupl[0] == 'targetEncoding' and nameKeyTupl[1] is not None and nameKeyTupl[1] != '-' and nameKeyTupl[1] != '':
-							self.targetEncodingUnicode = unicode(nameKeyTupl[1], 'utf-8')
-							self.targetEncoding = unicode.encode("%s" % self.targetEncodingUnicode, self.origEncoding)
+							self.targetEncoding = nameKeyTupl[1]
 						elif len(nameKeyTupl) == 2 and nameKeyTupl[0] == 'asciiCharList' and nameKeyTupl[1] is not None and nameKeyTupl[1] != '':
-							targetLangOrderAndListOfForeignLettersStrUnicode = unicode(nameKeyTupl[1], 'utf-8')
+							targetLangOrderAndListOfForeignLettersStrUnicode = makeUnicode(nameKeyTupl[1])
 						elif len(nameKeyTupl) == 2 and nameKeyTupl[0] == 'explicitKerningList' and nameKeyTupl[1] is not None and nameKeyTupl[1] != '-' and nameKeyTupl[1] != '':
 							# split at comma, then split at ':' and store tuples of character and explicit kerning
-							explicitKerningTokenUnicode = unicode(nameKeyTupl[1], 'utf-8')
-							explicitKerningTokenStr = unicode.encode("%s" % explicitKerningTokenUnicode, self.targetEncoding)
-							tokensOfExplicitKerningTokenStrList = explicitKerningTokenStr.split(',')
+							explicitKerningTokenUnicode = makeUnicode(nameKeyTupl[1])
+							explicitKerningTokenStr = unicodeEncode("%s" % explicitKerningTokenUnicode, self.targetEncoding)
+							tokensOfExplicitKerningTokenStrList = encodedSplit(explicitKerningTokenStr, ',')
 							for tokenX in tokensOfExplicitKerningTokenStrList:
-								tokensOfTupleList = tokenX.split(':')
+								tokensOfTupleList = encodedSplit(tokenX, ':')
 								self.listOfExplicitKerning.append((ord(tokensOfTupleList[0]), int(tokensOfTupleList[1])) )
 						elif len(nameKeyTupl) == 2 and nameKeyTupl[0] == 'explicitWidthIncrement' and nameKeyTupl[1] is not None and nameKeyTupl[1] != '-' and nameKeyTupl[1] != '':
 							# split at comma, then split at ':' and store tuples of character and explicit additional width - POSITIVE VALUES ONLY
-							explicitWidthIncrementTokenUnicode = unicode(nameKeyTupl[1], 'utf-8')
-							explicitWidthIncrementTokenStr =  unicode.encode("%s" % explicitWidthIncrementTokenUnicode, self.targetEncoding)
-							tokensOfWidthIncrementStrList = explicitWidthIncrementTokenStr.split(',')
+							explicitWidthIncrementTokenUnicode = makeUnicode(nameKeyTupl[1])
+							explicitWidthIncrementTokenStr = unicodeEncode("%s" % explicitWidthIncrementTokenUnicode, self.targetEncoding)
+							tokensOfWidthIncrementStrList = encodedSplit(explicitWidthIncrementTokenStr, ',')
 							for tokenX in tokensOfWidthIncrementStrList:
-								tokensOfTupleList = tokenX.split(':')
+								tokensOfTupleList = encodedSplit(tokenX, ':')
 								self.listOfWidthIncrements.append((ord(tokensOfTupleList[0]), int(tokensOfTupleList[1])))
 						elif len(nameKeyTupl) == 2 and nameKeyTupl[0] == 'specialOutOfOrderGlyphsUTF8ToAsciiTargetEncoding' and nameKeyTupl[1] is not None and nameKeyTupl[1] != '-' and nameKeyTupl[1] != '':
 							# split at comma, then split at ':' and store tuples of character
-							explicitOutOfOrderGlyphsTokenUnicode = unicode(nameKeyTupl[1], 'utf-8') # unicode(nameKeyTupl[1], 'utf-8')
+							explicitOutOfOrderGlyphsTokenUnicode = makeUnicode(nameKeyTupl[1]) # unicode(nameKeyTupl[1], 'utf-8')
 							#explicitOutOfOrderGlyphsTokenStr =  unicode.encode("%s" % explicitOutOfOrderGlyphsTokenUnicode, self.targetEncoding)
 							#explicitOutOfOrderGlyphsTokenStr =  explicitOutOfOrderGlyphsTokenUnicode.decode(self.targetEncoding) # unicode.encode("%s" % explicitOutOfOrderGlyphsTokenUnicode, 'utf-8')
 							tokensOfOutOfOrderGlyphsStrList = explicitOutOfOrderGlyphsTokenUnicode.split(',')
 							for tokenX in tokensOfOutOfOrderGlyphsStrList:
 								tokensOfTupleList = tokenX.split(':')
-								self.listOfOutOfOrderGlyphs.append( (unichr(ord(tokensOfTupleList[0])), unichr(ord(tokensOfTupleList[1]))) )
+								self.listOfOutOfOrderGlyphs.append( (getUnicodeSym(tokensOfTupleList[0]), getUnicodeSym(tokensOfTupleList[1])) )
 						elif len(nameKeyTupl) == 2 and nameKeyTupl[0] == 'originalFontName' and nameKeyTupl[1] is not None and nameKeyTupl[1] != '-' and nameKeyTupl[1] != '':
 							self.originalFontName =  nameKeyTupl[1]
 					except:
@@ -331,19 +333,17 @@ class grabberFromPNG:
 			print ("[Error] Override encoding file parsing has failed: Error Code 1.") #" Initializing for {0}...".format(self.defaultTargetLang)
 			#if gTraceModeEnabled:
 			#	self.targetEncoding = self.defaultTargetEncoding
-			#	self.targetEncodingUnicode = self.defaultTargetEncodingUnicode
 			#	targetLangOrderAndListOfForeignLettersStrUnicode = unicode(allOfGreekChars, 'utf-8')
 			#	print '[Debug] ', targetLangOrderAndListOfForeignLettersStrUnicode
 			sys.exit(1)	# terminate if override Failed (Blade Runner)
 
 		try:
-			targetLangOrderAndListOfForeignLettersStr = unicode.encode("%s" % targetLangOrderAndListOfForeignLettersStrUnicode, self.targetEncoding)
+			targetLangOrderAndListOfForeignLettersStr = unicodeEncode("%s" % targetLangOrderAndListOfForeignLettersStrUnicode, self.targetEncoding)
 		except:
 			## error
 			print ("[Error] Override encoding file parsing has failed: Error Code 2.") #"Initializing for {0}...".format(self.defaultTargetLang)
 			#if gTraceModeEnabled:
 			#	self.targetEncoding = self.defaultTargetEncoding
-			#	self.targetEncodingUnicode = self.defaultTargetEncodingUnicode
 			#	targetLangOrderAndListOfForeignLettersStrUnicode = unicode(allOfGreekChars, 'utf-8')
 			#	targetLangOrderAndListOfForeignLettersStr = unicode.encode("%s" % targetLangOrderAndListOfForeignLettersStrUnicode, self.targetEncoding)
 			#	print '[Debug] ' + targetLangOrderAndListOfForeignLettersStrUnicode
@@ -352,7 +352,7 @@ class grabberFromPNG:
 		targetLangOrderAndListOfForeignLetters = list(targetLangOrderAndListOfForeignLettersStr)
 		if gTraceModeEnabled:
 			print ('[Debug] ', targetLangOrderAndListOfForeignLetters, len(targetLangOrderAndListOfForeignLetters))	   # new
-		self.targetLangOrderAndListOfForeignLettersAsciiValues = [ord(i) for i in targetLangOrderAndListOfForeignLetters]
+		self.targetLangOrderAndListOfForeignLettersAsciiValues = makeToBytes(targetLangOrderAndListOfForeignLetters)
 		if gTraceModeEnabled:
 			print ('[Debug] ', self.targetLangOrderAndListOfForeignLettersAsciiValues, len(self.targetLangOrderAndListOfForeignLettersAsciiValues))
 		self.maxAsciiValueInEncoding = max(self.targetLangOrderAndListOfForeignLettersAsciiValues)
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
index 0f7de6c1fe0..3839ecd6a83 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
@@ -124,6 +124,7 @@ from xlrd import *
 from struct import *
 from subtlsVersTextResource import *
 from extracsTextResource import *
+from pythonCompat import *
 
 COMPANY_EMAIL = "classic.adventures.in.greek at gmail.com"
 APP_VERSION = "1.96"
@@ -265,14 +266,14 @@ def initOverrideEncoding(pathToConfigureFontsTranslationTxt):
 								if ( fontCateg_targetEnc_OOOGlyphs_Tuple[2] is not None \
 									and fontCateg_targetEnc_OOOGlyphs_Tuple[2] != ''):
 									# split at comma, then split at ':' and store tuples of character
-									explicitOutOfOrderGlyphsTokenUnicode = unicode(fontCateg_targetEnc_OOOGlyphs_Tuple[2], 'utf-8') # unicode(fontCateg_targetEnc_OOOGlyphs_Tuple[2], 'utf-8')
+									explicitOutOfOrderGlyphsTokenUnicode = makeUnicode(fontCateg_targetEnc_OOOGlyphs_Tuple[2]) # unicode(fontCateg_targetEnc_OOOGlyphs_Tuple[2], 'utf-8')
 									#explicitOutOfOrderGlyphsTokenStr =  unicode.encode("%s" % explicitOutOfOrderGlyphsTokenUnicode, gTargetEncoding)
 									#explicitOutOfOrderGlyphsTokenStr =  explicitOutOfOrderGlyphsTokenUnicode.decode(gTargetEncoding) # unicode.encode("%s" % explicitOutOfOrderGlyphsTokenUnicode, 'utf-8')
 									tokensOfOutOfOrderGlyphsStrList = explicitOutOfOrderGlyphsTokenUnicode.split(',')
 									for tokenX in tokensOfOutOfOrderGlyphsStrList:
 										tokensOfTupleList = tokenX.split(':')
 										if len(tokensOfTupleList) == 2:
-											tmpListOfOutOfOrderGlyphs.append( (unichr(ord(tokensOfTupleList[0])), unichr(ord(tokensOfTupleList[1])))  )
+											tmpListOfOutOfOrderGlyphs.append( (getUnicodeSym(tokensOfTupleList[0]), getUnicodeSym(tokensOfTupleList[1]))  )
 										else:
 											print ('[Error] Bad tuple syntax in configureFontsTranslation text file!')
 											configureTranslationFailed = True
@@ -686,7 +687,7 @@ def translateQuoteToAsciiProper(cellObj, pSheetName):
 		newQuoteReplaceSpecialsRetStr = newQuoteReplaceSpecials.encode(localTargetEncoding)
 	except Exception as e:
 		print ("[Error] Could not encode text in " + localTargetEncoding + "::" + str(e))
-		newQuoteReplaceSpecialsRetStr = "??????????"
+		newQuoteReplaceSpecialsRetStr = b"??????????"
 	#try:
 	#	newQuoteReplaceSpecialsRetStr = newQuoteReplaceSpecials.encode(localTargetEncoding)
 	#except:
@@ -1084,7 +1085,7 @@ def inputXLS(pathtoInputExcelFilename):
 				#write strings with null terminator
 				for idxe in range(0, len(gTableOfStringEntries)):
 					outTRxFile.write(gTableOfStringEntries[idxe])
-					outTRxFile.write('\0')
+					outTRxFile.write(b'\0')
 				outTRxFile.close()
 	return
 


Commit: 1a212bb6353854d18c83207c842e205b303052ab
    https://github.com/scummvm/scummvm/commit/1a212bb6353854d18c83207c842e205b303052ab
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Add missing final newline

Changed paths:
    devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py


diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py b/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
index 8b658c8891f..d82e4ffd5a3 100755
--- a/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
@@ -18,4 +18,4 @@ if not (sys.version_info[0] == 2 and  sys.version_info[1] == 7):
 
 import grabberFromPNG17BR
 if __name__ == "__main__":
-	grabberFromPNG17BR.main(sys.argv[0:])
\ No newline at end of file
+	grabberFromPNG17BR.main(sys.argv[0:])


Commit: 7373cc0de52fac46f87c673cbf668d610a4d490c
    https://github.com/scummvm/scummvm/commit/7373cc0de52fac46f87c673cbf668d610a4d490c
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Migrate create_bladerunner from xlrd to pandas

Changed paths:
    devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py


diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
index 3839ecd6a83..ebe50527083 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
@@ -64,9 +64,9 @@ else:
 	csvLibFound = True
 
 try:
-	import xlrd
+	import pandas
 except ImportError:
-	print ("[Error] xlrd python library is required to be installed!")
+	print ("[Error] pandas python library is required to be installed!")
 else:
 	xlrdLibFound = True
 
@@ -77,13 +77,6 @@ except ImportError:
 else:
 	xlwtLibFound = True
 
-try:
-	from xlutils.copy import copy
-except ImportError:
-	print ("[Error] xlutils python library is required to be installed!")
-else:
-	xlutilsLibFound = True
-
 try:
 	import re
 except ImportError:
@@ -108,7 +101,6 @@ if 	(not osLibFound) \
 	or (not csvLibFound) \
 	or (not xlrdLibFound) \
 	or (not xlwtLibFound) \
-	or (not xlutilsLibFound) \
 	or (not reLibFound) \
 	or (not structLibFound):
 	sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
@@ -630,12 +622,11 @@ def outputMIX():
 	# TODO all strings are NULL terminated in the TRE file!
 
 def translateQuoteToAsciiProper(cellObj, pSheetName):
-	if cellObj.ctype == xlrd.XL_CELL_NUMBER:
-		return '%.2f' % cellObj.value
-	newQuoteReplaceSpecials =  cellObj.value.encode("utf-8")
+	if isinstance(cellObj, float):
+		return ('%.2f' % cellObj).encode('ascii')
+	newQuoteReplaceSpecials =  cellObj
 	#if gTraceModeEnabled:
 	#	print ('[Debug] Encoded to unicode: %s' % (newQuoteReplaceSpecials))
-	newQuoteReplaceSpecials = newQuoteReplaceSpecials.decode("utf-8")
 
 	pertinentListOfOutOfOrderGlyphs = []
 
@@ -713,6 +704,17 @@ def parseIntCellValue(cell_obj_value, row_idx, col_idx, xl_sheet_name, xl_sheet_
 		sys.exit()
 	return retCandValue
 
+def addSheet(filename, book, new_sheetname, new_sheet):
+	sheet_names = book.sheet_names
+	sheets = [book.parse(i, header=None) for i in range(len(sheet_names))]
+	try:
+		with pandas.ExcelWriter(filename) as writer:
+			new_sheet.to_excel(writer, sheet_name=new_sheetname, index=False, header=False)
+			for (name, sheet) in zip(sheet_names, sheets):
+				sheet.to_excel(writer, sheet_name=name, index=False, header=False)
+	except Exception as e:
+		print ("[Error] Giving up: Could not save to output Excel file:: " + str(e))
+		sys.exit(1) # Terminate if we couldn't write to output Excel file
 
 def inputXLS(pathtoInputExcelFilename):
 	global gNumOfSpokenQuotes
@@ -730,7 +732,7 @@ def inputXLS(pathtoInputExcelFilename):
 		sys.exit(1) # Terminate if the input Excel had unsupported extension (or none)
 
 	try:
-		xl_workbook = xlrd.open_workbook(pathtoInputExcelFilename, encoding_override="utf-8")
+		xl_workbook = pandas.ExcelFile(pathtoInputExcelFilename)
 		if xl_workbook is not None:
 			print ("[Info] Opened Excel input file: %s" % (pathtoInputExcelFilename))
 	except Exception as e:
@@ -767,7 +769,7 @@ def inputXLS(pathtoInputExcelFilename):
 	try:
 		if gTraceModeEnabled:
 			print ('[Debug] Checking for existence of sheet: ' + SUPPORTED_DIALOGUE_VERSION_SHEET)
-		xl_sheet = xl_workbook.sheet_by_name(SUPPORTED_DIALOGUE_VERSION_SHEET)
+		xl_sheet = xl_workbook.parse(SUPPORTED_DIALOGUE_VERSION_SHEET, header=None)
 	except Exception as e:
 		if gTraceModeEnabled:
 			print ('[Debug] Could not open requested sheet: ' + SUPPORTED_DIALOGUE_VERSION_SHEET + ' in Excel::' + str(e))
@@ -777,37 +779,11 @@ def inputXLS(pathtoInputExcelFilename):
 		if gTraceModeEnabled:
 			print ('[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_DIALOGUE_VERSION_SHEET))
 		sbtlVersTRInstance = sbtlVersTextResource(gTraceModeEnabled)
-		bookCopy = copy(xl_workbook)
-		xl_sheet = bookCopy.add_sheet(SUPPORTED_DIALOGUE_VERSION_SHEET)
-		n = 0
-		col1_name = 'Subtitles Version Info'
-		xl_sheet.write(n, 0, col1_name)
-		# Second Row
-		n = 1
-		col1_name = 'ID'
-		col2_name = 'Value'
-		col3_name = 'Notes'
-		xl_sheet.write(n, 0, col1_name)
-		xl_sheet.write(n, 1, col2_name)
-		xl_sheet.write(n, 2, col3_name)
-		n += 1
-		objUTF8Unicode = None
-		for m, e1 in enumerate(sbtlVersTRInstance.getSbtlVersEntriesList(), n):
-			xl_sheet.write(m, 0, e1[0])
-			for i1 in range(1,3):
-				objStr = e1[i1]
-				try:
-					# We assume utf-8 charset (since we get the text from a python script)
-					objUTF8Unicode = unicode(objStr, 'utf-8')
-				except Exception as e:
-					print ('[Error] Failed to create unicode string: ' + str(e))
-					objUTF8Unicode = unicode("???", 'utf-8')
-				xl_sheet.write(m, i1, objUTF8Unicode)
-		try:
-			bookCopy.save(pathtoInputExcelFilename)
-		except Exception as e:
-			print ("[Error] Giving up: Could not save to output Excel file:: " + str(e))
-			sys.exit(1) # Terminate if we couldn't write to output Excel file
+		xl_sheet = pandas.DataFrame([
+			['Subtitles Version Info'],
+			['ID', 'Value', 'Notes']
+		] + sbtlVersTRInstance.getSbtlVersEntriesList())
+		addSheet(pathtoInputExcelFilename, xl_workbook, SUPPORTED_DIALOGUE_VERSION_SHEET, xl_sheet)
 
 		if gTraceModeEnabled:
 			print ('[Debug] Sheet: %s was created successfully.' % (SUPPORTED_DIALOGUE_VERSION_SHEET))
@@ -820,7 +796,7 @@ def inputXLS(pathtoInputExcelFilename):
 	try:
 		if gTraceModeEnabled:
 			print ('[Debug] Checking for existence of sheet: ' + SUPPORTED_EX_CR_SHEET)
-		xl_sheet = xl_workbook.sheet_by_name(SUPPORTED_EX_CR_SHEET)
+		xl_sheet = xl_workbook.parse(SUPPORTED_EX_CR_SHEET, header=None)
 	except Exception as e:
 		if gTraceModeEnabled:
 			print ('[Debug] Could not open requested sheet: ' + SUPPORTED_EX_CR_SHEET + ' in Excel::' + str(e))
@@ -830,37 +806,10 @@ def inputXLS(pathtoInputExcelFilename):
 		if gTraceModeEnabled:
 			print ('[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_EX_CR_SHEET))
 		excrTRInstance = extracTextResource(gTraceModeEnabled)
-		bookCopy = copy(xl_workbook)
-		xl_sheet = bookCopy.add_sheet(SUPPORTED_EX_CR_SHEET)
-		n = 0
-		col1_name = 'Extra Info'
-		xl_sheet.write(n, 0, col1_name)
-		# Second Row
-		n = 1
-		col1_name = 'ID'
-		col2_name = 'Value'
-		col3_name = 'Notes'
-		xl_sheet.write(n, 0, col1_name)
-		xl_sheet.write(n, 1, col2_name)
-		xl_sheet.write(n, 2, col3_name)
-		n += 1
-		objUTF8Unicode = None
-		for m, e1 in enumerate(excrTRInstance.getExtracEntriesList(), n):
-			xl_sheet.write(m, 0, e1[0])
-			for i1 in range(1,3):
-				objStr = e1[i1]
-				try:
-					# We assume utf-8 charset (since we get the text from a python script)
-					objUTF8Unicode = unicode(objStr, 'utf-8')
-				except Exception as e:
-					print ('[Error] Failed to create unicode string: ' + str(e))
-					objUTF8Unicode = unicode("???", 'utf-8')
-				xl_sheet.write(m, i1, objUTF8Unicode)
-		try:
-			bookCopy.save(pathtoInputExcelFilename)
-		except Exception as e:
-			print ("[Error] Giving up: Could not save to output Excel file:: " + str(e))
-			sys.exit(1) # Terminate if we couldn't write to output Excel file
+		xl_sheet = pandas.DataFrame([['Extra Info'], ['ID', 'Value', 'Notes']]
+					    + excrTRInstance.getExtracEntriesList())
+
+		addSheet(pathtoInputExcelFilename, xl_workbook, SUPPORTED_EX_CR_SHEET, xl_sheet)
 
 		if gTraceModeEnabled:
 			print ('[Debug] Sheet: %s was created successfully.' % (SUPPORTED_EX_CR_SHEET))
@@ -873,7 +822,7 @@ def inputXLS(pathtoInputExcelFilename):
 	for sheetDialogueName in mergedListOfSupportedSubtitleSheetsAndTranslatedTREs:
 		xl_sheet = None
 		try:
-			xl_sheet = xl_workbook.sheet_by_name(sheetDialogueName)
+			xl_sheet = xl_workbook.parse(sheetDialogueName, header=None)
 		except Exception as e:
 			if gTraceModeEnabled:
 				print ('[Debug] Could not open requested sheet: ' + sheetDialogueName + ' in Excel::' + str(e))
@@ -884,8 +833,8 @@ def inputXLS(pathtoInputExcelFilename):
 
 		if xl_sheet is not None:
 			if gTraceModeEnabled:
-				print ('[Debug] Sheet name: %s' % xl_sheet.name)
-			gNumOfSpokenQuotes = xl_sheet.nrows - 2 # all rows minus the first TWO rows with headers
+				print ('[Debug] Sheet name: %s' % sheetDialogueName)
+			gNumOfSpokenQuotes = xl_sheet.shape[0] - 2 # all rows minus the first TWO rows with headers
 			if gTraceModeEnabled:
 				print ('[Debug] Number of spoken quotes: %d' % gNumOfSpokenQuotes)
 			# stats for debug
@@ -911,19 +860,19 @@ def inputXLS(pathtoInputExcelFilename):
 			# 1: new version - Col order: "Frame Start", "Frame End", "Subtitle", "Time Start", "Time End", "By Actor", "Notes"
 			vqaSheetFormatVersion = 0
 
-			if xl_sheet.name in supportedInGameQuotesSheetsList:
+			if sheetDialogueName in supportedInGameQuotesSheetsList:
 				if gTraceModeEnabled:
 					print ('[Debug] IN GAME QUOTES')
 				mode = 1 #in-game quote
-			elif xl_sheet.name in mergedListOfSupportedSubtitleSheets:
+			elif sheetDialogueName in mergedListOfSupportedSubtitleSheets:
 				if gTraceModeEnabled:
 					print ('[Debug] VQA SCENE DIALOGUE')
 				mode = 2 #VQA
 				# check if the VQA sheets are of the old format or the new format
-				cell_obj = xl_sheet.cell(1, 0)
-				if cell_obj is not None and cell_obj.value.lower() == 'frame start':
+				cell_obj = xl_sheet.iat[1, 0]
+				if cell_obj is not None and isinstance(cell_obj, str) and cell_obj.lower() == 'frame start':
 					vqaSheetFormatVersion = 1
-			elif xl_sheet.name in supportedTranslatedTrxFilenamesList:
+			elif sheetDialogueName in supportedTranslatedTrxFilenamesList:
 				if gTraceModeEnabled:
 					print ('[Debug] TRANSLATED TEXT RESOURCE')
 				mode = 3 # Translated TRE
@@ -931,11 +880,12 @@ def inputXLS(pathtoInputExcelFilename):
 			del gTableOfStringIds[:]
 			del gTableOfStringEntries[:]
 			del gTableOfStringOffsets[:]
-			for row_idx in range(2, xl_sheet.nrows):
+			for row_idx in range(2, xl_sheet.shape[0]):
 				#if gTraceModeEnabled:
 				#	print "[Debug] Line %d" % (row_idx)
-				for col_idx in range(0, xl_sheet.ncols):
-					cell_obj = xl_sheet.cell(row_idx, col_idx)
+				for col_idx in range(0, xl_sheet.shape[1]):
+					cell_obj = xl_sheet.iat[row_idx, col_idx]
+#					print ('[Debug] Coord: [%d, %d, %s] cell_obj: [%s]' % (col_idx, row_idx, sheetDialogueName, cell_obj))
 					#
 					# FOR IN-GAME QUOTES -- Iterate through columns starting from col 0. We need cols: 0, 2
 					#
@@ -944,12 +894,12 @@ def inputXLS(pathtoInputExcelFilename):
 						#	print ('[Debug] Column: [%s] cell_obj: [%s]' % (col_idx, cell_obj))
 						if(col_idx == 0):
 							#switchFlagShowQuote = False
-							twoTokensfirstColSplitAtDotXLS = cell_obj.value.split('.', 1)
+							twoTokensfirstColSplitAtDotXLS = cell_obj.split('.', 1)
 							if len(twoTokensfirstColSplitAtDotXLS) == 2:
 								twoTokensfirstColSplitAtDashXLS = twoTokensfirstColSplitAtDotXLS[0].split('-', 1)
 								if len(twoTokensfirstColSplitAtDashXLS) == 2:
-									tmpActorPart = parseIntCellValue(twoTokensfirstColSplitAtDashXLS[0], row_idx, col_idx, xl_sheet.name, xl_sheet.nrows, xl_sheet.ncols)
-									tmpSubQuotePart = parseIntCellValue(twoTokensfirstColSplitAtDashXLS[1], row_idx, col_idx, xl_sheet.name, xl_sheet.nrows, xl_sheet.ncols)
+									tmpActorPart = parseIntCellValue(twoTokensfirstColSplitAtDashXLS[0], row_idx, col_idx, sheetDialogueName, xl_sheet.shape[0], xl_sheet.shape[1])
+									tmpSubQuotePart = parseIntCellValue(twoTokensfirstColSplitAtDashXLS[1], row_idx, col_idx, sheetDialogueName, xl_sheet.shape[0], xl_sheet.shape[1])
 									tmpQuoteID = tmpActorPart * 10000 + tmpSubQuotePart
 									#if gTraceModeEnabled:
 									#	print ('[Debug] Row_idx: %d. Tag: %s, QuoteId: [%d]' % (row_idx, twoTokensfirstColSplitAtDotXLS[0], tmpQuoteID))
@@ -964,7 +914,7 @@ def inputXLS(pathtoInputExcelFilename):
 								#	print ('[Debug] object: %s' % (cell_obj))
 								##	newQuoteReplaceSpecials =	 cell_obj.value.decode("utf-8") # unicode(cell_obj.value, 'windows-1252')
 								##	print ('[Debug] decoded to unicode: %s ' % (newQuoteReplaceSpecials)) # error with char xf1
-							newQuoteReplaceSpecialsAscii = translateQuoteToAsciiProper(cell_obj, xl_sheet.name)
+							newQuoteReplaceSpecialsAscii = translateQuoteToAsciiProper(cell_obj, sheetDialogueName)
 							#if switchFlagShowQuote == True:
 								#if gTraceModeEnabled:
 								#	print ('[Debug] length: %d: %s' % (len(newQuoteReplaceSpecialsAscii), newQuoteReplaceSpecialsAscii))
@@ -987,17 +937,17 @@ def inputXLS(pathtoInputExcelFilename):
 					#
 					elif mode == 2:
 						if (col_idx == 2): # subtitle text
-							newQuoteReplaceSpecialsAscii = translateQuoteToAsciiProper(cell_obj, xl_sheet.name)
+							newQuoteReplaceSpecialsAscii = translateQuoteToAsciiProper(cell_obj, sheetDialogueName)
 							#print ('[Debug] length: %d: %s' % (len(newQuoteReplaceSpecialsAscii), newQuoteReplaceSpecialsAscii))
 							#print ':'.join(x.encode('hex') for x in newQuoteReplaceSpecialsAscii)	# seems to work.  new chars are non-printable but exist in string
 							# don't append to gTableOfStringEntries yet
 						elif (vqaSheetFormatVersion == 1 and col_idx == 0) or (vqaSheetFormatVersion == 0 and col_idx == 9):
 							# startFrame
 							#print "[Debug] cell: %s" % (cell_obj.value)
-							tmpStartFrame = parseIntCellValue(cell_obj.value, row_idx, col_idx, xl_sheet.name, xl_sheet.nrows, xl_sheet.ncols)
+							tmpStartFrame = parseIntCellValue(cell_obj, row_idx, col_idx, sheetDialogueName, xl_sheet.shape[0], xl_sheet.shape[1])
 						elif (vqaSheetFormatVersion == 1 and col_idx == 1) or (vqaSheetFormatVersion == 0 and col_idx == 10):
 							# endFrame
-							tmpEndFrame = parseIntCellValue(cell_obj.value, row_idx, col_idx, xl_sheet.name, xl_sheet.nrows, xl_sheet.ncols)
+							tmpEndFrame = parseIntCellValue(cell_obj, row_idx, col_idx, sheetDialogueName, xl_sheet.shape[0], xl_sheet.shape[1])
 						if (vqaSheetFormatVersion == 1 and col_idx == 2) or (vqaSheetFormatVersion == 0 and col_idx == 10):
 							# do the final processing when you reached the final meaningful column
 							tmpQuoteID = tmpStartFrame | (tmpEndFrame << 16) # top 16 bits are end frame (up to 65536 frames which is enough) and low 16 bits are startFrame
@@ -1017,7 +967,7 @@ def inputXLS(pathtoInputExcelFilename):
 						if gTraceModeEnabled:
 							print ('[Debug] Column: [%s] cell_obj: [%s]' % (col_idx, cell_obj))
 						if(col_idx == 0):
-							tmpQuoteID = parseIntCellValue(cell_obj.value, row_idx, col_idx, xl_sheet.name, xl_sheet.nrows, xl_sheet.ncols)
+							tmpQuoteID = parseIntCellValue(cell_obj, row_idx, col_idx, sheetDialogueName, xl_sheet.shape[0], xl_sheet.shape[1])
 							gTableOfStringIds.append(tmpQuoteID)
 						elif(col_idx == 1) :
 							#if switchFlagShowQuote == True:
@@ -1025,14 +975,14 @@ def inputXLS(pathtoInputExcelFilename):
 							#	 print ('[Debug] object: %s' % (cell_obj))
 							#	 #newQuoteReplaceSpecials =	 cell_obj.value.decode("utf-8") # unicode(cell_obj.value, 'windows-1252')
 							#	 #print ('[Debug] decoded to unicode: %s ' % (newQuoteReplaceSpecials)) # error with char xf1
-							newQuoteReplaceSpecialsAscii = translateQuoteToAsciiProper(cell_obj, xl_sheet.name)
-							if xl_sheet.name == SUPPORTED_DIALOGUE_VERSION_SHEET:
+							newQuoteReplaceSpecialsAscii = translateQuoteToAsciiProper(cell_obj, sheetDialogueName)
+							if sheetDialogueName == SUPPORTED_DIALOGUE_VERSION_SHEET:
 								if tmpQuoteID == 2:
 								#generate date timestamp
 									now = datetime.now()
-									newQuoteReplaceSpecialsAscii = now.strftime("%H:%M:%S %d/%m/%Y")
+									newQuoteReplaceSpecialsAscii = makeAscii(now.strftime("%H:%M:%S %d/%m/%Y"))
 								elif tmpQuoteID == 3:
-									newQuoteReplaceSpecialsAscii = gActiveLanguageDescriptionCodeTuple[2]
+									newQuoteReplaceSpecialsAscii = makeAscii(gActiveLanguageDescriptionCodeTuple[2])
 							#if switchFlagShowQuote == True:
 							#	 print ('[Debug] length: %d: %s' % (len(newQuoteReplaceSpecialsAscii), newQuoteReplaceSpecialsAscii))
 							#print ':'.join(x.encode('hex') for x in newQuoteReplaceSpecialsAscii)	 # seems to work.  new chars are non-printable but exist in string


Commit: ecf7283251cc02513884cfce9c7fbc255c05e9f2
    https://github.com/scummvm/scummvm/commit/ecf7283251cc02513884cfce9c7fbc255c05e9f2
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-06-05T19:53:39+03:00

Commit Message:
CREATE_BLADERUNNER: Remove Python 2.7 guard

Changed paths:
    devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
    devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py


diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py b/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
index d82e4ffd5a3..4563ad8223e 100755
--- a/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/fontCreator.py
@@ -12,10 +12,6 @@ if (not sysLibFound):
 	sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
 	sys.exit(1)
 
-if not (sys.version_info[0] == 2 and  sys.version_info[1] == 7):
-	sys.stdout.write("[Error] Blade Runner Font Creator script requires Python 2.7\n")
-	sys.exit(1)
-
 import grabberFromPNG17BR
 if __name__ == "__main__":
 	grabberFromPNG17BR.main(sys.argv[0:])
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
index 288139cc702..371e13949de 100755
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
@@ -12,10 +12,6 @@ if 	(not sysLibFound):
 	sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
 	sys.exit(1)
 
-if not (sys.version_info[0] == 2 and  sys.version_info[1] == 7):
-	sys.stdout.write("[Error] Blade Runner MIX Resource Creator script requires Python 2.7\n")
-	sys.exit(1)
-
 import packBladeRunnerMIXFromPCTLKXLS04
 if __name__ == "__main__":
 	packBladeRunnerMIXFromPCTLKXLS04.main(sys.argv[0:])




More information about the Scummvm-git-logs mailing list