| 21 | import rlcompleter |
| 22 | |
| 23 | class CompleterNG(rlcompleter.Completer): |
| 24 | def global_matches(self, text): |
| 25 | """ |
| 26 | Compute matches when text is a simple name. |
| 27 | Return a list of all names currently defined in self.namespace |
| 28 | that match. |
| 29 | """ |
| 30 | |
| 31 | matches = [] |
| 32 | n = len(text) |
| 33 | |
| 34 | for ns in (self.namespace,): |
| 35 | for word in ns: |
| 36 | if word[:n] == text: |
| 37 | matches.append(word) |
| 38 | |
| 39 | return matches |
| 40 | except: |
| 41 | readline._readline = None |
| 42 |
no outgoing calls
no test coverage detected
searching dependent graphs…