Page 352 -
P. 352
graphical interface elements
Test Drive
Enter the code from the previous page into IDLE, save it as hfmix.pyw,
and press F5 to try it out. The first version
of the DJ's
program entered in
IDLE.
The track starts
playing with a click
here and stops playing
with a click here.
You already know how to display buttons on a GUI and That‛s not a
associate them with event-handling code. What’s new in this bad start...
code is the loops = -1 bit, which arranges to play the sound
repeatedly. That is, the track loops.
That was almost too easy!
you are here 4 317