summaryrefslogtreecommitdiffstats
path: root/lib/kformula/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kformula/scripts')
-rwxr-xr-xlib/kformula/scripts/bycodes.py10
-rwxr-xr-xlib/kformula/scripts/bynames.py8
-rwxr-xr-xlib/kformula/scripts/oper-dict.py8
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py
index f5da0ae0..35b79a55 100755
--- a/lib/kformula/scripts/bycodes.py
+++ b/lib/kformula/scripts/bycodes.py
@@ -23,18 +23,18 @@ import string
import qt
def decode( fd, font, line ):
- begin = string.tqfind( line, '"' )
- end = string.tqfind( line, '"', begin + 1)
+ begin = string.find( line, '"' )
+ end = string.find( line, '"', begin + 1)
tqunicode = line[begin + 2:end] # Remove 'U' from string aswell
char_list = []
- separation = string.tqfind( tqunicode, '-' )
+ separation = string.find( tqunicode, '-' )
if separation != -1:
second = tqunicode
while separation != -1:
first = second[0:separation]
second = second[separation + 2:]
char_list.append( string.atoi( first, 16 ) )
- separation = string.tqfind( second, '-' )
+ separation = string.find( second, '-' )
if separation == -1:
char_list.append( string.atoi( second, 16 ) )
else:
@@ -51,7 +51,7 @@ def parse( file, font ):
fd2 = open( 'mathml.list', 'w' )
line = fd.readline()
while line != "":
- if string.tqfind( line, 'name' ) != -1:
+ if string.find( line, 'name' ) != -1:
decode( fd2, font, line )
line = fd.readline()
diff --git a/lib/kformula/scripts/bynames.py b/lib/kformula/scripts/bynames.py
index 50fac994..0829cf90 100755
--- a/lib/kformula/scripts/bynames.py
+++ b/lib/kformula/scripts/bynames.py
@@ -109,14 +109,14 @@ def name_cmp( a, b ):
def parse( fr, fw ):
line = fr.readline()
- while line != "" and string.tqfind( line, '<pre>' ) == -1:
+ while line != "" and string.find( line, '<pre>' ) == -1:
line = fr.readline()
- pos = string.tqfind( line, '<pre>' ) ### Ad-hoc detection
+ pos = string.find( line, '<pre>' ) ### Ad-hoc detection
if pos == -1:
return
line = line[pos + len('<pre>'):].strip() ### Ad-hoc detection
entries = []
- while line != "" and string.tqfind( line, ',' ) != -1:
+ while line != "" and string.find( line, ',' ) != -1:
fields = line.split(',')
name = fields[0].strip()
number = fields[1].strip()
@@ -124,7 +124,7 @@ def parse( fr, fw ):
# TODO: Support multicharacter entities, should also be supported by
# application. The best solution would probably to map to a single
# character provided by the font in the private area of Unicode
- if string.tqfind( number, '-' ) == -1:
+ if string.find( number, '-' ) == -1:
entries.append( [name, '0x' + number[1:]] )
line = fr.readline().strip()
diff --git a/lib/kformula/scripts/oper-dict.py b/lib/kformula/scripts/oper-dict.py
index a91a7971..49191ef6 100755
--- a/lib/kformula/scripts/oper-dict.py
+++ b/lib/kformula/scripts/oper-dict.py
@@ -190,12 +190,12 @@ def parse( fr, fw, entities ):
attr_list[10]: '"false"'
}
fields = line.split()
- name = string.tqreplace( fields[0], '&amp;', '&' )
+ name = string.replace( fields[0], '&amp;', '&' )
fields.pop(0) # Remove name
entities_found = True
while True:
- begin = string.tqfind( name, '&' )
- end = string.tqfind( name, ';' )
+ begin = string.find( name, '&' )
+ end = string.find( name, ';' )
if begin == -1 or end == -1:
break
###
@@ -204,7 +204,7 @@ def parse( fr, fw, entities ):
# character provided by the font in the private area of Unicode
entity_name = name[begin + 1:end]
if entities.has_key( entity_name ) :
- name = name.tqreplace( '&' + entity_name + ';', unichr(entities[entity_name]));
+ name = name.replace( '&' + entity_name + ';', unichr(entities[entity_name]));
else:
entities_found = False
break