I've been searching on how to do it without pygame, but I haven't found a way.
Basically all I want to do is to press a key and play a sound, but I do not know how to register keystrokes in python.
edit: Forgot to mention, for Windows.
I've been searching on how to do it without pygame, but I haven't found a way.
Basically all I want to do is to press a key and play a sound, but I do not know how to register keystrokes in python.
edit: Forgot to mention, for Windows.
It (getting keypresses and playing sounds) is probably operating system specific, and you might want to use some widget toolkit (interfaced to Python). So consider using one of PyGTK, PyQt, PySDL2 or some other suitable toolkit. I guess that for a game, PySDL2 should be the most suitable.
You might focus on the WinAPI only and follow this.