SourceForge has been redesigned. Learn more.
Close

Code completion does not work

2006-11-20
2013-03-15
  • Fredrik Persson

    Fredrik Persson - 2006-11-20

    Hi!

    I've just installed Eclipse + PyDev on an Ubuntu machine, and I can't really get code completion to work.

    If I import, for example, StringIO and the type:

    StringIO. (ctrl+space)

    ... the drop down menu with possible completions will appear, but if I import gtk, I type

    gtk. (ctrl+space)

    ... and then nothing appears. I've tried to read the FAQ on the pydev home page and also the section on PYTHONPATH on http://www.fabioz.com/pydev/manual_101_root.html but this still won't work... any ideas? TIA.

     
    • Thomas Krüger

      Thomas Krüger - 2006-12-05

      It looks like Eclipse has problems with the massive symlinks in the site-packages folder.
      As a workaround you can include the per-module site-packages directory from pycentral:
      e.g. /usr/share/pycentral/python-sqlalchemy/site-packages/

      Thomas

       
    • Fabio Zadrozny

      Fabio Zadrozny - 2006-12-09

      Can you report it as a bug? I'm yet to install linux here, but hopefully, I'll be able to install it this month so I can check linux issues better...

      Cheers,

      Fabio

       
    • Marcelo Fernandez

      I'm getting this problem too... but I can't get PyDev to see "all" gtk... I added "/usr/share/python-support/python-gtk2/gtk-2.0" to the library path, but still getting no autocomplete for GTK Objects (Windows, Buttons, widgets, etc.). Every other path I added doesn't work, and this seems like "trial-and-test"... :-(

      Is there anything else I can do to enable autocompletion for gtk?

      Thanks
      Marcelo

       
      • Trond Andersen

        Trond Andersen - 2007-05-16

        I have the same trouble using Ubuntu Feisty. I've tried to add the gtk/gnome packages in several ways, but none of them seems to help me get the gtk/gnome into the path.

        On the other side, Komodo found the gtk/gnome libraries without any configuration.

        This should really be much simpler.

         
    • Marcelo Fernandez

      Update: I updated to Ubuntu Feisty 7.04 (which comes with Python 2.5), and now the autocompletion for gtk modules in Eclipse 3.2.2 + Pydev 1.3.2 + Python 2.5 works perfectly (I just installed Pydev in a new, clean Eclipse).

      (Ubuntu Edgy 6.10 comes with Python 2.4).

      Cheers,
      Marcelo