Is there a way to map the following lines to 1.5.2? I amusing 1.5.2 not the sys admin won;t upgrade to 2.0. I got a scirpt written for 2.0 and try to port it back to 1.5.2 .. Code: [fromValue, toValue] = line.split(delimiter)[:2] # Split line replaced by: [fromValue, toValue] = string.split(line,delimiter) ....... No idea how to replace these lines with 1.5.2 syntax: if caseInsensitive: # charMap[ord(fromValue.upper())] = toValue # charMap[ord(fromValue.lower())] = toValue replaced by: I don't know ... # self.charMap = "".join(charMap) replaced by: self.charMap = string.join("",charMap) ............ if not wholeWords: # rePattern = '|'.join(map(re.escape, fromVals)) replaced by: rePattern = string.join('|', map(re.escape,fromVals)) else: # rePattern = r'\b(' + '|'.join(map(re.escape, fromVals)) + r')\b' replaced by: temp = string.join('|', map(re.escape,fromVals)) temp = string.join(temp,r')\b') rePattern = string.join(r'\b(',temp) --- ??? Tahnks
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4