Show More
@@ -228,7 +228,8 b' class CompletionSplitter(object):' | |||
|
228 | 228 | |
|
229 | 229 | # A string of delimiter characters. The default value makes sense for |
|
230 | 230 | # IPython's most typical usage patterns. |
|
231 | _delims = ' \t\n`!@#$^&*()=+[{]}\\|;:\'",<>?' | |
|
231 | #_delims = ' \t\n`!@#$^&*()=+[{]}\\|;:\'",<>?' | |
|
232 | _delims = ' \n\t' | |
|
232 | 233 | |
|
233 | 234 | # The expression (a normal string) to be compiled into a regular expression |
|
234 | 235 | # for actual splitting. We store it as an attribute mostly for ease of |
@@ -349,14 +350,18 b' class Completer(object):' | |||
|
349 | 350 | |
|
350 | 351 | """ |
|
351 | 352 | |
|
352 |
# |
|
|
353 | #io.rprint('Completer->attr_matches, txt=%r' % text) # dbg | |
|
353 | 354 | # Another option, seems to work great. Catches things like ''.<tab> |
|
354 | 355 | m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text) |
|
355 | 356 | |
|
356 |
if |
|
|
357 | return [] | |
|
358 | ||
|
359 | expr, attr = m.group(1, 3) | |
|
357 | if m: | |
|
358 | expr, attr = m.group(1, 3) | |
|
359 | else: | |
|
360 | m2 = re.match(r"(.+)\.(\w*)$", self.line_buffer) | |
|
361 | if not m2: | |
|
362 | return [] | |
|
363 | expr, attr = m2.group(1,2) | |
|
364 | ||
|
360 | 365 | try: |
|
361 | 366 | obj = eval(expr, self.namespace) |
|
362 | 367 | except: |
@@ -579,7 +584,7 b' class IPCompleter(Completer):' | |||
|
579 | 584 | def python_matches(self,text): |
|
580 | 585 | """Match attributes or global python names""" |
|
581 | 586 | |
|
582 |
# |
|
|
587 | #io.rprint('Completer->python_matches, txt=%r' % text) # dbg | |
|
583 | 588 | if "." in text: |
|
584 | 589 | try: |
|
585 | 590 | matches = self.attr_matches(text) |
@@ -680,7 +685,7 b' class IPCompleter(Completer):' | |||
|
680 | 685 | return argMatches |
|
681 | 686 | |
|
682 | 687 | def dispatch_custom_completer(self, text): |
|
683 |
# |
|
|
688 | #io.rprint("Custom! '%s' %s" % (text, self.custom_completers)) # dbg | |
|
684 | 689 | line = self.line_buffer |
|
685 | 690 | if not line.strip(): |
|
686 | 691 | return None |
General Comments 0
You need to be logged in to leave comments.
Login now