That's very typical of programs using a GUI platform. One way or another you have to kick off an event handler, whether it's TKinter or Qt or in this case, GTK. The event handler runs independent of your code and has to be told when to quit. I have to agree that
GTK.Alert("Hello world!")
-> signal_connect("destroy", lambda(){ exit(0); });
does seem to be less than intuitive and not a pretty thing to drop into a hello-world tutorial!