window with buttons and sound, without finish.
[tibetan_culture:learn_tibetan.git] / main.py
1 from random import shuffle
2 from unicodedata import lookup
3 from Tkinter import *
4 from pygame import mixer
5
6 letras = {"ka":(lookup("tibetan letter ka"), "sound/ka.mp3"), 
7           "kha":(lookup("tibetan letter kha"), "sound/kha.mp3")}
8
9 def play_ogg():
10     mixer.init()
11     mixer.music.load('Example.ogg')
12     mixer.music.play()
13     
14 #print letras["ka"][0] # letra tibetana (importante poner el print)
15 #letras["ka"][1] # fichero de sonido
16
17 ventana = Tk()
18 ventana.geometry("650x560+100+80")
19 label = Label(ventana, text = letras['ka'][0], font=("", 80))
20 label.pack()
21 #play_sound=Button(ventana,width=50,height=50,fg='black',
22 #            bitmap='snackPlay', command=play_ogg).place(x=115,y=501)
23 option_1 = Button(ventana,width=50,height=50,fg='red', 
24                   bitmap='snackRecord').place(x=5,y=501) 
25 option_2=Button(ventana,width=50,height=50,fg='black', 
26             bitmap='snackStop').place(x=60,y=501) 
27 option_3=Button(ventana,width=50,height=50,fg='black', 
28                 bitmap='snackPlay', command=play_ogg).place(x=115,y=501) 
29 option_4=Button(ventana,width=5,height=3,fg='black', 
30                 text='Save').place(x=170,y=501) 
31 ventana.mainloop()