Set the frame of the completer.
(self, frame=None)
| 2230 | self.Completer.custom_matchers.insert(pos,newcomp) |
| 2231 | |
| 2232 | def set_completer_frame(self, frame=None): |
| 2233 | """Set the frame of the completer.""" |
| 2234 | if frame: |
| 2235 | self.Completer.namespace = frame.f_locals |
| 2236 | self.Completer.global_namespace = frame.f_globals |
| 2237 | else: |
| 2238 | self.Completer.namespace = self.user_ns |
| 2239 | self.Completer.global_namespace = self.user_global_ns |
| 2240 | |
| 2241 | #------------------------------------------------------------------------- |
| 2242 | # Things related to magics |