from gi.repository import Gtk
#print Gtk.GTK_MAJOR_VERSION
win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
That is my code, how can I know which version of Gtk is being used.
Thank you!
GTK and Python It supports Linux, Windows and macOS and works with Python 2.7+, Python 3.5+, PyPy and PyPy3.
PyGObject provides a wrapper for use in Python programs when accessing GObject libraries. GObject is an object system used by GTK, GLib, GObject, GIO, GStreamer and other libraries.
You can use the following functions to get the version information:
Gtk.get_major_version()
Gtk.get_minor_version()
Gtk.get_micro_version()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With