eric6/DebugClients/Python/FlexCompleter.py

changeset 7628
f904d0eef264
parent 7250
d8bdc55aee1a
child 7639
422fd05e9c91
equal deleted inserted replaced
7626:7f643d41464e 7628:f904d0eef264
178 m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text) 178 m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
179 if not m: 179 if not m:
180 return [] 180 return []
181 expr, attr = m.group(1, 3) 181 expr, attr = m.group(1, 3)
182 try: 182 try:
183 thisobject = eval(expr, self.namespace) 183 thisobject = eval(expr, self.namespace) # secok
184 except Exception: 184 except Exception:
185 return [] 185 return []
186 186
187 # get the content of the object, except __builtins__ 187 # get the content of the object, except __builtins__
188 words = set(dir(thisobject)) 188 words = set(dir(thisobject))
204 if (word[:n] == attr and 204 if (word[:n] == attr and
205 not (noprefix and word[:n + 1] == noprefix)): 205 not (noprefix and word[:n + 1] == noprefix)):
206 match = "{0}.{1}".format(expr, word) 206 match = "{0}.{1}".format(expr, word)
207 try: 207 try:
208 val = getattr(thisobject, word) 208 val = getattr(thisobject, word)
209 except Exception: 209 except Exception: # secok
210 pass # Include even if attribute not set 210 pass # Include even if attribute not set
211 else: 211 else:
212 match = self._callable_postfix(val, match) 212 match = self._callable_postfix(val, match)
213 matches.append(match) 213 matches.append(match)
214 if matches or not noprefix: 214 if matches or not noprefix:

eric ide

mercurial