Project 2d – Implementing a Python text interface to VLC

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 file
  • It 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

Get Raspberry Pi Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.