def hello_world_window():
    # Create a new window.
    window = gtk.Window(gtk.WINDOW_TOPLEVEL)
    window.set_border_width(50)

    # Create a new button with the label "Hello World".
    button = gtk.Button("Hello World")
    window.add(button)

    # Clicking the button prints some text.
    def clicked(data):
        print('Button clicked!')

    button.connect("clicked", clicked)

    # Display the window.
    button.show()
    window.show()
Create a GTK window with one 'Hello world' button.
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/examples/inputhook.py/hello_world_window