adj = Gtk.Adjustment(0, 0, 100, 1, 10, 0)
def on_scale_changed(scale, adj): value = adj.get_value() print("Scale value: {}".format(value)) adj = Gtk.Adjustment(0, 0, 100, 1, 10, 0) scale = Gtk.Scale.new(Gtk.Orientation.HORIZONTAL, adj) scale.connect("value-changed", on_scale_changed, adj)This creates a horizontal Gtk.Scale widget using the previously created `adj` adjustment. The `on_scale_changed` function is connected to the `value-changed` signal of the Gtk.Scale, which prints the current value of the adjustment object. The `gi.repository` package library is a Python wrapper for the GNOME project's GObject Introspection infrastructure.