import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

def main():
    window = Gtk.Window(default_width=200, default_height=200)
    expander = Gtk.Expander(label="Hello")

    label = Gtk.Label(label="a "*150)
    label.set_padding(50, 50)
    label.set_selectable(True)
    label.set_line_wrap(True)
    label.select_region(0, -1)

    expander.add(label)
    expander.set_expanded(True)

    window.add(expander)
    window.show_all()
    window.connect("delete-event", Gtk.main_quit)
    Gtk.main()


main()
