The methodology for testing the radio.py
file is available in the Chapter 4
supplemental materials folder. It is a simple text interface with the following features:
It reads the Internet station streams we want from a file called
/home/radio/playlist
It shows the first item in the playlist is the default item, and it will play as soon as the application loads
It prints out a list of the stations in the
playlist
fileIt allows you to enter a station number to start playing any station
It implements a simple retry mechanism if stations don't start to play within 2 seconds
It allows you to enter '
0
' to exit the program