MCPcopy
hub / github.com/geekcomputers/Python / directorychooser

Function directorychooser

Mp3_media_player.py:22–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21
22def directorychooser():
23 directory = askdirectory()
24 os.chdir(directory)
25
26 for files in os.listdir(directory):
27 if files.endswith(".mp3"):
28 realdir = os.path.realpath(files)
29 audio = ID3(realdir)
30 realnames.append(audio["TIT2"].text[0])
31
32 listofsongs.append(files)
33
34 pygame.mixer.init()
35 pygame.mixer.music.load(listofsongs[0])
36 # pygame.mixer.music.play()
37
38
39directorychooser()

Callers 1

Calls 2

appendMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected