Changeset 391 for python/trunk/Lib/idlelib/AutoComplete.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/idlelib/AutoComplete.py
r2 r391 8 8 import string 9 9 10 from configHandler import idleConf 11 12 import AutoCompleteWindow 13 from HyperParser import HyperParser 14 15 import __main__ 10 from idlelib.configHandler import idleConf 16 11 17 12 # This string includes all chars that may be in a file name (without a path … … 23 18 # These constants represent the two different types of completions 24 19 COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1) 20 21 from idlelib import AutoCompleteWindow 22 from idlelib.HyperParser import HyperParser 23 24 import __main__ 25 25 26 26 SEPS = os.sep … … 157 157 return 158 158 self.autocompletewindow = self._make_autocomplete_window() 159 self.autocompletewindow.show_window(comp_lists, 160 "insert-%dc" % len(comp_start), 161 complete, 162 mode, 163 userWantsWin) 164 return True 159 return not self.autocompletewindow.show_window( 160 comp_lists, "insert-%dc" % len(comp_start), 161 complete, mode, userWantsWin) 165 162 166 163 def fetch_completions(self, what, mode): … … 191 188 bigl.sort() 192 189 if "__all__" in bigl: 193 smalll = eval("__all__", namespace) 194 smalll.sort() 190 smalll = sorted(eval("__all__", namespace)) 195 191 else: 196 smalll = filter(lambda s: s[:1] != '_', bigl)192 smalll = [s for s in bigl if s[:1] != '_'] 197 193 else: 198 194 try: … … 201 197 bigl.sort() 202 198 if "__all__" in bigl: 203 smalll = entity.__all__ 204 smalll.sort() 199 smalll = sorted(entity.__all__) 205 200 else: 206 smalll = filter(lambda s: s[:1] != '_', bigl)201 smalll = [s for s in bigl if s[:1] != '_'] 207 202 except: 208 203 return [], [] … … 215 210 bigl = os.listdir(expandedpath) 216 211 bigl.sort() 217 smalll = filter(lambda s: s[:1] != '.', bigl)212 smalll = [s for s in bigl if s[:1] != '.'] 218 213 except OSError: 219 214 return [], []
Note:
See TracChangeset
for help on using the changeset viewer.