[SciPy-user] IPython completion

Jeffery D. Collins scipy-user@scipy.net
Tue, 09 Sep 2003 10:06:55 -0600

I was using Python2.3 on Solaris 8 when I reported yesterday.  I have 
found the same to be true on my Linux (RH-9.0) box as well.  Here is the 
information you requested below, but for the linux box instead:

Python 2.3 (#1, Sep  9 2003, 09:49:11)
Type "copyright", "credits" or "license" for more information.
IPython 0.5.0 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
@magic  -> Information about IPython's 'magic' @ functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
IPython profile: numeric
*** Your version of Gnuplot appears not to have mouse support.
*** Type `gphelp` for help on the Gnuplot integration features.
In [1]: import readline
In [2]: readline?
Type:           module
Base Class:     <type 'module'>
String Form:    <module 'readline' from 
Namespace:      Interactive
File:           /usr/local/lib/python2.3/lib-dynload/readline.so
    Importing this module enables command line editing using GNU readline.
In [3]: dir(readline)

I also moved .ipython aside to allow for the creation of a new one, but 
it didn't help.  There is no ~/.inputrc file, so no local customizations 
to the underlying readline library have been made.  A quick comparison 
of the readline.c source for Python2.2 and Python2.3 shows many 
differences, so it's possible that some default behavior has changed.  I 
should reiterate that there is no problem with using <tab> to complete 
names within the python namespace.  It's just the completion of file/dir 
names that does not work.

Fernando Perez wrote:

> Jeffery D. Collins wrote:
>>> Can you test 'import readline' in a normal (non-ipython) python 
>>> shell?  I want to know if your readline support is indeed correct.
>> It imports just fine.  Can you suggest any other tests I should try 
>> on the readline module?
> Weird, very weird.  Try (in ipython):
> In [1]: import readline
> In [2]: readline?
> Type:           module
> Base Class:     <type 'module'>
> String Form:    <module 'readline' from 
> '/usr/local/lib/python2.3/lib-dynload/readline.so'>
> Namespace:      Interactive
> File:           /usr/local/lib/python2.3/lib-dynload/readline.so
> This is the oputput from my machine.  Then do a dir(readline).  This 
> is what I get:
> In [3]: dir(readline)
> Out[3]:
> ['__doc__',
>  '__file__',
>  '__name__',
>  'add_history',
>  'get_begidx',
>  'get_completer',
> ...
> If all looks normal, try renaming your ~/.ipython directory so that 
> IPython makes a new one, and see if that helps.  You might have some 
> readline-related customizations which break under 2.3.  I wasn't aware 
> of any changes made to readline in python 2.3 though, so I'm shooting 
> a bit in the dark here.
> Also, let me know which platform you are running under.
> Cheers,
> f.
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user

Jeffery Collins (http://www.boulder.net/~jcollins)