O'Reilly logo

Tkinter GUI Programming by Example by David Love

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

The casino_sounds package

We will use the popular game development library called pygame in order to play our audio. Pygame is primarily a game-development library for Python, providing its own set of game-related features, one of which is a very simple API for playing audio files. This is how we will handle adding sound to our game.

You may not already have this library installed. This presents us with a good opportunity to look at using virtual environments in order to manage our Python libraries.

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