diff --git a/wx/py/shell.py b/wx/py/shell.py index b8eed3a8..a5fa6a71 100644 --- a/wx/py/shell.py +++ b/wx/py/shell.py @@ -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)