Code completion with introspective bindings
Is there any way to get code completion with PyGObject? I've really tried EVERYTHING you can think of.
I have pycharm build 138.2401 where this bug :https://youtrack.jetbrains.com/issue/PY-6932 is supposed to be fixed but I can't get any code suggestions.
This simple code would raise a warning (Gtk is not found):
I really need help. I've been trying for hours and can't get this sorted out.
Thanks in advance.
Iván Lago.
I have pycharm build 138.2401 where this bug :https://youtrack.jetbrains.com/issue/PY-6932 is supposed to be fixed but I can't get any code suggestions.
This simple code would raise a warning (Gtk is not found):
- #!/usr/bin/python3
- from gi.repository import Gtk
I really need help. I've been trying for hours and can't get this sorted out.
Thanks in advance.
Iván Lago.
Please sign in to leave a comment.
Make sure you have PyGObject installed.
File>Settings>Project:Your_Project_Name>Project Interperter
Click on the green plus "+" and type "PyGObject"
Click on PyGObject and Install Package
Mine failed the first time and on my Ubuntu system.
So, I also had to install these extra packages to even get the PyGObject to install:
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window()
window.connect("delete-event", Gtk.main_quit)
window.show_all()
Gtk.main()