##// END OF EJS Templates
fix for underscore completion
Paul Ivanov -
Show More
@@ -46,25 +46,8 b' Notes:'
46 used, and this module (and the readline module) are silently inactive.
46 used, and this module (and the readline module) are silently inactive.
47 """
47 """
48
48
49 #*****************************************************************************
49 # Copyright (c) IPython Development Team.
50 #
50 # Distributed under the terms of the Modified BSD License.
51 # Since this file is essentially a minimally modified copy of the rlcompleter
52 # module which is part of the standard Python distribution, I assume that the
53 # proper procedure is to maintain its copyright as belonging to the Python
54 # Software Foundation (in addition to my own, for all new code).
55 #
56 # Copyright (C) 2008 IPython Development Team
57 # Copyright (C) 2001 Fernando Perez. <fperez@colorado.edu>
58 # Copyright (C) 2001 Python Software Foundation, www.python.org
59 #
60 # Distributed under the terms of the BSD License. The full license is in
61 # the file COPYING, distributed as part of this software.
62 #
63 #*****************************************************************************
64
65 #-----------------------------------------------------------------------------
66 # Imports
67 #-----------------------------------------------------------------------------
68
51
69 import __main__
52 import __main__
70 import glob
53 import glob
@@ -735,7 +718,7 b' class IPCompleter(Completer):'
735 else:
718 else:
736 # true if txt is _not_ a _ name, false otherwise:
719 # true if txt is _not_ a _ name, false otherwise:
737 no__name = (lambda txt:
720 no__name = (lambda txt:
738 re.match(r'.*\._.*?',txt) is None)
721 re.match(r'.*\._.*?',txt[txt.rindex('.'):]) is None)
739 matches = filter(no__name, matches)
722 matches = filter(no__name, matches)
740 except NameError:
723 except NameError:
741 # catches <undefined attributes>.<tab>
724 # catches <undefined attributes>.<tab>
General Comments 0
You need to be logged in to leave comments. Login now