Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/idlelib/AutoComplete.py

    r2 r391  
    88import string
    99
    10 from configHandler import idleConf
    11 
    12 import AutoCompleteWindow
    13 from HyperParser import HyperParser
    14 
    15 import __main__
     10from idlelib.configHandler import idleConf
    1611
    1712# This string includes all chars that may be in a file name (without a path
     
    2318# These constants represent the two different types of completions
    2419COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1)
     20
     21from idlelib import AutoCompleteWindow
     22from idlelib.HyperParser import HyperParser
     23
     24import __main__
    2525
    2626SEPS = os.sep
     
    157157            return
    158158        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)
    165162
    166163    def fetch_completions(self, what, mode):
     
    191188                    bigl.sort()
    192189                    if "__all__" in bigl:
    193                         smalll = eval("__all__", namespace)
    194                         smalll.sort()
     190                        smalll = sorted(eval("__all__", namespace))
    195191                    else:
    196                         smalll = filter(lambda s: s[:1] != '_', bigl)
     192                        smalll = [s for s in bigl if s[:1] != '_']
    197193                else:
    198194                    try:
     
    201197                        bigl.sort()
    202198                        if "__all__" in bigl:
    203                             smalll = entity.__all__
    204                             smalll.sort()
     199                            smalll = sorted(entity.__all__)
    205200                        else:
    206                             smalll = filter(lambda s: s[:1] != '_', bigl)
     201                            smalll = [s for s in bigl if s[:1] != '_']
    207202                    except:
    208203                        return [], []
     
    215210                    bigl = os.listdir(expandedpath)
    216211                    bigl.sort()
    217                     smalll = filter(lambda s: s[:1] != '.', bigl)
     212                    smalll = [s for s in bigl if s[:1] != '.']
    218213                except OSError:
    219214                    return [], []
Note: See TracChangeset for help on using the changeset viewer.