Teaching Python

Chris King squirrel at wpi.edu
Tue Jun 22 16:42:52 EDT 2004


Leif K-Brooks <eurleif at ecritters.biz> should have written in message
news:<PCGyc.3314$Hf.1863274 at newshog.newsread.com>...
> going to VB after a genuine OO language is a complete nightmare.
Fixed ;)

VB's IDE is a great way for your students to get immediate feedback
while designing their GUI, but so is the combination of Python's
immediate interpreter and Tkinter. With code as simple as this,
entered in the interpreter:

>>> from Tkinter import *
>>> Label(text='Hello, world!').pack()
>>> def cmd(): print 'click!'
>>> Button(text='Click me!',command=cmd).pack()

students can both watch the window be built as they enter commands,
and immediately have a program that 'does something' (albiet something
as simple as printing 'click!' on the screen). Getting feedback like
this will allow them to more readily understand what's going on in
non-VB languages that require code to create GUIs.



More information about the Python-list mailing list