GUI Program Error

John Salerno johnjsal at NOSPAMgmail.com
Wed Jun 7 13:38:39 EDT 2006


Byte wrote:
> Thanks, this works. Now, since the tutorial I was using is clearly
> rubbish, any better ones? For a (relative) newbie please. Also, how do
> I code a GUI Hello World program?
> 
>  -- /usr/bin/byte
> 

Actually, that site is generally considered to be a pretty good place to 
start for tutorials. I think maybe you didn't go far enough through the 
"Tour of Some Common Widgets" section before you experienced problems 
(i.e., you didn't get to pack() or mainloop(), etc.).

But I will agree with you that it is confusing when it says, following 
the top = Tk() line, "Notice that a new blank window has appeared", 
because as you noticed, nothing appears yet. My only guess is that this 
is either a mistake, or the tutorial is a little old, because I think 
Tkinter used to behave differently in the interactive prompt than it 
does now.

Anyhow, I would stick with that site, but you might also try Fredrik's 
tutorial: http://www.pythonware.com/library/tkinter/introduction/

It's a great little intro, but also a reference to the widgets, methods, 
etc. I pretty much learned everything so far from that site (admittedly 
I'm just as new as you are, but it's still a good site!) :)



More information about the Python-list mailing list