Merge pull request #365 from wxWidgets/fix-issue362

Fix some Py3 compatibility issues
This commit is contained in:
Robin Dunn
2017-05-18 08:46:20 -07:00
committed by GitHub

View File

@@ -750,10 +750,12 @@ class Shell(editwindow.EditWindow):
#unique (no duplicate words
#oneliner from german python forum => unique list
unlist = [thlist[i] for i in xrange(len(thlist)) if thlist[i] not in thlist[:i]]
unlist = [thlist[i] for i in range(len(thlist)) if thlist[i] not in thlist[:i]]
#sort lowercase
unlist.sort(lambda a, b: cmp(a.lower(), b.lower()))
def _cmp(a,b):
return ((a > b) - (a < b))
unlist.sort(lambda a, b: _cmp(a.lower(), b.lower()))
#this is more convenient, isn't it?
self.AutoCompSetIgnoreCase(True)