Classes, OOP, Tkinter general comments and detailed questions...

Alan Gauld alan.gauld at bt.com
Mon Apr 9 11:55:08 EDT 2001


Ron Stephens wrote:
> I love Python. But I am having trouble getting to understand 
> classes well enough to use them. This is especially a 
> problem because I want to use Tkinter. 

Ok, This may or may not help. Try my online tutor.

http://www.crosswinds.net/~agauld/

Go straight to the "advanced" section (its not that advanced!)
and work through the OO, event driven, and the (new) GUI
programming
topics.

If you don't understand anything specific send me mail via 
the feedback link on the web pages and I'll do my best to 
explain....

> Fortran in college (math and physics majors). Procedural programming
> seems logical to me. Programs must follow the logic, and programs thus
> can do only one thing. 

Sounds like the event driven nature of OOP/GUI work is what's 
really confusing you not OOP as such. Think of event driven 
as being like interriupt driven in assembler... an event 
arrives somewhat like a hardware interrupt and causes an 
event handler to fire - just like an intrrupt handler in
assembler.

> seems to me that the coder just made up some stuff that he felt might
> work, and it did, almost magically. This bothers me. 

It can take a bit of adjustment. But in essence you are right. 
The flow of control is removed from the programmer and put 
in the hands of the GUI environment and the user.

HTH,

Alan g



More information about the Python-list mailing list