Guest User

Untitled

a guest
Jun 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def sound1():
  2. path = r'C:/sound'
  3. for sound in os.listdir(path):
  4. playsound('%s/%s' % (path, sound))
  5.  
  6. def quit():
  7. root1.quit()
  8.  
  9. def wind():
  10. global root1
  11. root1 = Tk()
  12. btn1 = Button(text="Запустить проигрыватель", command=sound1)
  13. btn2 = Button(text="Выйти", command=quit)
  14. btn1.pack()
  15. btn2.pack()
  16. root1.mainloop()
  17. t = threading.Thread(target=wind).start()
  18. j = threading.Thread(target=sound1).start()
Add Comment
Please, Sign In to add comment