diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-01-22 02:02:13 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2023-01-22 02:02:13 +0100 |
commit | 86480e58eafc1fa3486e03155ed34e02b4595a24 (patch) | |
tree | 0e8f64c4003ea558e946b7a3347688904b451635 /lib/kformula/scripts/bycodes.py | |
parent | 135d005014a1e85295af4e379f026a361537ae5f (diff) | |
download | koffice-86480e58eafc1fa3486e03155ed34e02b4595a24.tar.gz koffice-86480e58eafc1fa3486e03155ed34e02b4595a24.zip |
Drop python2 support in scripts.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'lib/kformula/scripts/bycodes.py')
-rwxr-xr-x | lib/kformula/scripts/bycodes.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py index 45b787a0..fdd84269 100755 --- a/lib/kformula/scripts/bycodes.py +++ b/lib/kformula/scripts/bycodes.py @@ -25,11 +25,11 @@ from TQt import qt def decode( fd, font, line ): begin = string.find( line, '"' ) end = string.find( line, '"', begin + 1) - unicode = line[begin + 2:end] # Remove 'U' from string aswell + str = line[begin + 2:end] # Remove 'U' from string aswell char_list = [] - separation = string.find( unicode, '-' ) + separation = string.find( str, '-' ) if separation != -1: - second = unicode + second = str while separation != -1: first = second[0:separation] second = second[separation + 2:] @@ -38,13 +38,13 @@ def decode( fd, font, line ): if separation == -1: char_list.append( string.atoi( second, 16 ) ) else: - char_list.append( string.atoi ( unicode, 16 ) ) + char_list.append( string.atoi ( str, 16 ) ) fm = qt.TQFontMetrics( qt.TQFont( font ) ) in_font = True for c in char_list: if not fm.inFont( qt.TQChar( c ) ): in_font = False - fd.write( unicode + ' ' + str( in_font ) + '\n') + fd.write( str + ' ' + str( in_font ) + '\n') def parse( file, font ): fd = open( file ) |