[pygtk] Hello world etc.
Peter Stahlir
peter.stahlir at googlemail.com
Sat Jan 26 00:15:43 WST 2008
Hi!
I have two suggestions for your documentation:
1. Hello world
I had to go through
http://www.pygtk.org/
http://www.pygtk.org/tutorial.html
http://www.pygtk.org/pygtk2tutorial/index.html
http://www.pygtk.org/pygtk2tutorial/ch-GettingStarted.html#sec-HelloWorld
to find it. Could you link it from the main page?
2. Hello world again
My hello world reads:
import gtk;
button = gtk.Button( 'Hello world!' )
button.connect( "clicked", gtk.main_quit )
button.show()
window = gtk.Window()
window.add( button )
window.show()
gtk.main()
This is 8 lines compared to 82 from your example.
I think a helloworld is there for getting a quick idea how things work.
I _really_ hate them if it takes more than 5 seconds to get it.
(By the way, glade is the reason I coded my last program with Qt (*cough*) )
3. API reference
I am not able to find definitions of gtk.main or gtk.main_quit in the reference.
Thanks,
ps
More information about the pygtk
mailing list