1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from tkinter import * import winsound window = Tk() window.title('À½¾Ç Ç÷¹ÀÌ') window.geometry('300x150') songs = ['Komorebi.wav', 'New_Land.wav', 'St_Francis.wav'] flags = winsound.SND_FILENAME| winsound.SND_ASYNC | winsound.SND_LOOP lbl = Label(window, text="Ç÷¹ÀÌÇÒ °îÀ» ¼±ÅÃÇϼ¼¿ä", font=('¹ÙÅÁ', 16, 'bold')) lbl.pack() def play_song() : select = choice.get() winsound.PlaySound(songs[select], flags) choice = IntVar() for n in range(len(songs)) : rab1 = Radiobutton(window, text=songs[n], variable=choice, value=n, command=play_song) rab1.pack() | cs |