jeudi 7 avril 2016

putting mp3 files in a list on python 3

Hello Guys !! So i am working with some friends on a mp3 player on mp3 and we are facing a problem.

So we have for example that path : /Users/hp/Desktop/python/housemusic in which we find some mp3 songs.

Our goal is to make a list of that mp3 songs and to run them randomly( through that command for example random.choice()) so that we have an mp3 file selected and then to run it

So my question is : is it possible to get an mp3 instead of a str or an int ?

how can we make a list of mp3 files from a given file while lists are used to put an str or an int value to print it afterword ?

What if we want to "print" one of that songs given threw the list ? Pygame.mixer.music.load(list) (where list is the song randomly selected) and pygame.mixer.music.play() are enought ?

Thanks !




Aucun commentaire:

Enregistrer un commentaire