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: |