Hi,

You don't need to do anything special, other than installing Jedi for the right Python version (i.e. if you're working with Python 2, python-jedi, else python3-jedi).

You can verify that Spyder is detecting Jedi by going to the menu

    Help > Optional dependencies

and verifying that the Jedi entry is not in red.

Other than that, I don't know how else to hep you :-)


Cheers,
Carlos

El 02/03/15 a las 16:46, Jaleks escribió:


Am Montag, 2. März 2015 22:18:00 UTC+1 schrieb Carlos Córdoba:

    Hi,

    First, a bit of context: completion in the Editor and the
    Python/IPython consoles are handled in very different ways. The
    reason is that we can't evaluate the code users are developing in
    the Editor to get completions (because it can be syntactically
    incorrect at any given moment). So we use two third-party
    libraries (rope and jedi) that try to get completions without
    evaluation.

    That's why completion in our consoles will always be better than
    in the Editor. But that's a limitation of Python in general, and
    something not only suffered by Spyder but by any other Python IDE
    (e.g. PyDev, PyCharm, etc).


Thx for the info…


    Second, some good news: since Spyder 2.3.3 you can get completions
    of PyGtk by installing the Jedi library, version 0.8.1. 2.3.3 is
    the first version that comes with integration with Jedi, older
    versions don't support it.

      I tried your examples and they are working fine for me.


Thats where I notice again, that I am a Spyder beginner: Is there anything special I have to configure for it to work? I even removed python-rope completely from my system and it still does not make a (real) difference (just in IPython I now do not get an error anymore, when typing 'Gtk.MessageDialog(' ) in Spyder itself everything is just like before: no doc and no 'dialog.' / 'Gtk.' completion. (jedi version is shown as OK, its 0.8.1final0) Indeed I even just crashed Spyder, when fooling around more after reinstalling rope. (Spyder 2.3.3 out of the zip file, started with ./bootstrap.py, console message: "QThread: Destroyed while thread is still running")

Jaleks


    Cheers,
    Carlos

    El 02/03/15 a las 11:19, [email protected] <javascript:>
    escribió:
    Hi all,

    somehow I do not get the auto-completition of Spyder (2.3.1 out
    of current Debian Sid) working for GTK usage.
    Following code was taken (and modified) from the PyGtk tutorial:

    |
    importpygtk
        pygtk.require('2.0')
    importgtk
        dialog
    =gtk.MessageDialog(type=gtk.MESSAGE_ERROR,buttons=gtk.BUTTONS_CLOSE)
        dialog.set_markup("Message")
        dialog.set_title(APP_NAME +" - Error")
        dialog.show()
        gtk.main()

    |

    And thisone fromanother tutorial,usinganother kind of import:

    |

    fromgi.repository importGtk

        message ="\n<b>Error.</b>\n"+message
        dialog =Gtk.MessageDialog(None,0,
    Gtk.MessageType.ERROR,Gtk.ButtonsType.CLOSE,"unformated message")
        dialog.set_title(APP_NAME +" - Error")
        dialog.run()

    |

    In both cases I do not get the usual completition popups (except
    of the parts already used in code) – be it for classes of
    modules, their methods or constants – and I do not get any
    documentation for any methods like 'dialog.run()' or
    'dialog.show()' at all.

    I also tried to add some directorys to PYTHONPATH in Spyder:

    |
    /usr/lib/python2.7/dist-packages/gi/overrides/
    /usr/lib/python2.7/dist-packages/gi/repository/
    /usr/lib/python2.7/dist-packages/gi/_gobject/
    /usr/lib/python2.7/dist-packages/gobject/
    /usr/lib/python2.7/dist-packages/glib/
    /usr/lib/python2.7/dist-packages/gtk-2.0/
    /usr/lib/python2.7/dist-packages/gtk-2.0/gio/
    /usr/lib/python2.7/dist-packages/gtk-2.0/gnome/
    /usr/lib/python2.7/dist-packages/gtk-2.0/gnomevfs/
    /usr/lib/python2.7/dist-packages/gtk-2.0/bonobo
    /usr/lib/python2.7/dist-packages/gtk-2.0/gtk

    |

    which also made no difference (even after restarting Spyder)
    The code is in either case working as expected, so that should
    not be the problem.

    If anyone has an idea how to fix this I'd be quite happy.

    (As I am quite new to Python, Spyder and also GTK, these trys
    might also not be "the way" to import GTK libs, so if anybody
    could help out in any direction I'd be happy.)

    Thanks, Jaleks
-- You received this message because you are subscribed to the
    Google Groups "spyder" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected] <javascript:>.
    To post to this group, send email to [email protected]
    <javascript:>.
    Visit this group at http://groups.google.com/group/spyderlib.
    For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to