diff -r aff959a3ba13 Lib/idlelib/AutoComplete.py --- a/Lib/idlelib/AutoComplete.py Sun Sep 08 18:44:40 2013 -0500 +++ b/Lib/idlelib/AutoComplete.py Tue Sep 10 00:36:53 2013 -0700 @@ -216,7 +216,13 @@ expandedpath = os.path.expanduser(what) bigl = os.listdir(expandedpath) bigl.sort() - smalll = [s for s in bigl if s[:1] != '.'] + # Handle case-insensitivity on Windows + if os.name == 'nt': + smalll = [s.lower() if s.lower() not in bigl else s + for s in bigl if s[:1] != '.'] + else: + smalll = [s for s in bigl if s[:1] != '.'] + # XXX: Not sure why this is s[:1] instead of s[0] except OSError: return [], [] diff -r aff959a3ba13 Lib/idlelib/AutoCompleteWindow.py --- a/Lib/idlelib/AutoCompleteWindow.py Sun Sep 08 18:44:40 2013 -0500 +++ b/Lib/idlelib/AutoCompleteWindow.py Tue Sep 10 00:36:53 2013 -0700 @@ -1,6 +1,7 @@ """ An auto-completion window for IDLE, used by the AutoComplete extension """ +import os from tkinter import * from idlelib.MultiCall import MC_SHIFT from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES @@ -99,7 +100,14 @@ last = i-1 if first == last: # only one possible completion - return self.completions[first] + if os.name == 'nt': + i = 0 + for s in map(str.lower, self.ntcompletions): + if s == self.completions[first]: + return self.ntcompletions[i] + i += 1 + else: + return self.completions[first] # We should return the maximum prefix of first and last first_comp = self.completions[first] @@ -152,6 +160,8 @@ matching completion, don't open a list.""" # Handle the start we already have self.completions, self.morecompletions = comp_lists + if os.name == 'nt': + self.ntcompletions = self.morecompletions self.mode = mode self.startindex = self.widget.index(index) self.start = self.widget.get(self.startindex, "insert")