> Dave A.

Yeah I'm using MRAB's code, my current code is : 


#Initalisation
global event
global hitkey


#Functions
def key(event): 
     
     hitkey = event.char 
     instance = multiprocessing.Process(target=player, args=(hitkey,)) 
     instance.start() 


def player(hitkey): 
     winsound.PlaySound(hitkey + '.wav', 
winsound.SND_FILENAME|winsound.SND_NOWAIT|winsound.SND_ASYNC) 


if __name__ == "__main__":
    
    
     fenetre = Tk() 
     frame = Frame(fenetre, width=200, height=100)
     

     frame.focus_set()
     frame.bind("<Key>", key)
     frame.pack()
     fenetre.mainloop()
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to