This is a simple Python script to shuffle play MP3 files from a specified folder. It's a command-line tool that randomly plays all the MP3 files located in a given directory.
Prerequisites Before you run the script, make sure you have:
Python: The script is written in Python and requires it to run. You can download and install Python from python.org.
Pygame Library: This script uses the pygame library for audio playback. If you haven't installed pygame, you can do so using pip:
bash Copy code pip install pygame Installation No installation is required. Just download the shuffle_play.py script to your local machine.
Usage To use the script, follow these steps:
Place Your MP3 Files: Ensure your MP3 files are in a folder.
Run the Script: Open a terminal or command prompt and navigate to the directory where you have saved shuffle_play.py. Run the script with the following command:
bash Copy code python shuffle_play.py path_to_your_music_folder Replace path_to_your_music_folder with the actual path to your folder containing MP3 files.
Enjoy the Music: The script will shuffle and play the MP3 files in the specified folder.
Features Shuffle Play: Randomly plays all the MP3 files in the specified folder. Command Line Interface: Easy to run from the terminal or command prompt. Troubleshooting Pygame Installation: If you encounter issues with pygame, ensure it is correctly installed and updated. MP3 Files Only: The script is designed to play MP3 files only. Make sure your folder contains MP3 files. Correct Folder Path: If the script cannot find the folder, check if the provided path is correct. License This script is released under the MIT License.