O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding and removing items from a playlist

Let's write some code for a feature that allows us to add and remove items from a playlist. To be more specific, we will write the code for a function for the four buttons marked in the following screenshot:

The four buttons, from left to right, perform the following functions:

  • The first button from the left adds individual audio files to a playlist
  • The second button deletes all the selected items from the playlist
  • The third button scans a directory for audio files and adds all the found audio files to the playlist
  • The last button empties the playlist

Since adding these features requires us to interact ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required