On 04/30/2013 08:22 AM, alternativ...@rocketmail.com wrote:
  > 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()


And you're still getting a new window ?  Wow!


--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to