[IPython-User] tab completion not working for my libraries

Michael Aye kmichael.aye@gmail....
Fri Nov 23 03:36:33 CST 2012


On 2012-11-23 06:04:29 +0000, David Warde-Farley said:

> On Thu, Nov 22, 2012 at 10:57 PM, Michael Aye <kmichael.aye@gmail.com> wrote:
> First I thought it has something to do with my libraries not being in
> my PYTHONPATH yet, but after adding, ipython still does not
> tab-complete my own libraries, even so it finds them alright.
> 
> Interestingly this works fine on my Macbook, the problem occurs on our
> CentOS linux server, running EPD 7.3-1. (Same as on the Macbook).
> 
> So what really controls if a library can be tab-completed?
> 
> Just to be sure, have you imported these libraries in the current 
> IPython session? Tab completion doesn't work until an object actually 
> exists (which is basically a limitation of Python being a dynamic 
> language), so if the import statement hasn't been executed, it won't 
> work.

Not true, I can use tab-completion already at the time of import, which 
is what I am talking about here, sorry if that was unclear.
Try it for yourself:

In [1]: import c
cPickle                chaco                  commands               crypt
cProfile               check_ctx_boundaries   compileall             csv
cStringIO              chunk                  compiler               
ctx_and_mola
cairo                  cloud                  configobj              ctx_isis
calendar               cmath                  contextlib             ctypes
calib                  cmd                    cookielib              
cube_loader
calib_compare          code                   copy                   curses
canny                  codecs                 copy_files_from_input  
custom_fixers
casuarius              codeop                 copy_reg               
custom_tools
cfmfile                codetools              coreg_value_writer     cython
cgi                    collections            coregister             
cythonmagic
cgitb                  colorsys               coverage

Michael

> 
> David
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user





More information about the IPython-User mailing list