##// END OF EJS Templates
fix tab-completion bug in embedded ipython reported by Arnd
fperez -
Show More
@@ -80,7 +80,7 b' except NameError:'
80 80 from sets import Set as set
81 81
82 82
83 from IPython.genutils import shlex_split
83 from IPython.genutils import shlex_split,debugp
84 84
85 85 __all__ = ['Completer','IPCompleter']
86 86
@@ -392,6 +392,7 b' class IPCompleter(Completer):'
392 392
393 393 def alias_matches(self, text):
394 394 """Match internal system aliases"""
395
395 396 #print 'Completer->alias_matches:',text # dbg
396 397 text = os.path.expanduser(text)
397 398 aliases = self.alias_table.keys()
@@ -402,7 +403,8 b' class IPCompleter(Completer):'
402 403
403 404 def python_matches(self,text):
404 405 """Match attributes or global python names"""
405 #print 'Completer->python_matches' # dbg
406
407 #print 'Completer->python_matches, txt=<%s>' % text # dbg
406 408 if "." in text:
407 409 try:
408 410 matches = self.attr_matches(text)
@@ -6,7 +6,7 b' Requires Python 2.1 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 994 2006-01-08 08:29:44Z fperez $
9 $Id: iplib.py 995 2006-01-08 16:23:20Z fperez $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -844,6 +844,7 b' class InteractiveShell(object,Magic):'
844 844
845 845 def ipsystem(self,arg_s):
846 846 """Make a system call, using IPython."""
847
847 848 self.system(arg_s)
848 849
849 850 def complete(self,text):
@@ -880,7 +881,7 b' class InteractiveShell(object,Magic):'
880 881 outcomps.sort()
881 882 return outcomps
882 883
883 def set_completer_frame(self, frame):
884 def set_completer_frame(self, frame=None):
884 885 if frame:
885 886 self.Completer.namespace = frame.f_locals
886 887 self.Completer.global_namespace = frame.f_globals
@@ -892,6 +893,7 b' class InteractiveShell(object,Magic):'
892 893 """Define some aliases automatically.
893 894
894 895 These are ALL parameter-less aliases"""
896
895 897 for alias,cmd in self.auto_alias:
896 898 self.alias_table[alias] = (0,cmd)
897 899
@@ -1346,7 +1348,7 b' want to merge them back into the new files.""" % locals()'
1346 1348
1347 1349 # make sure the tab-completer has the correct frame information, so it
1348 1350 # actually completes using the frame's locals/globals
1349 self.set_completer_frame(call_frame)
1351 self.set_completer_frame()
1350 1352
1351 1353 # before activating the interactive mode, we need to make sure that
1352 1354 # all names in the builtin namespace needed by ipython point to
@@ -1,5 +1,9 b''
1 1 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
2 2
3 * IPython/iplib.py (embed_mainloop): fix tab-completion in
4 embedded instances, for variables defined at the interactive
5 prompt of the embedded ipython. Reported by Arnd.
6
3 7 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
4 8 it can be used as a (stateful) toggle, or with a direct parameter.
5 9
General Comments 0
You need to be logged in to leave comments. Login now