a simple python error. How can I solve this?
hi all.
I would like to ask for help in python.
I'm trying to test the pyglet's key event function and when I run the program, I get an indentation error and I don't know when this error means.
could someone explain why this error happened?
Here goes my stupid code
import pyglet
import accessible_output2.outputs.auto
import time
window = pyglet.window.Window()
key = pyglet.window.key()
speaker = accessible_output2.outputs.auto.Auto()
speaker.speak("test program started")
key_press = window.key_press()
def key_press():
speaker.speak("please press space")
counter = 0
if key.space:
speaker.speak("space was pressed")
counter = counter+1
else:
speaker.speak("unknown key")
print("now sleeping")
time.sleep(10)
pyglet.app.run()
while counter < 10:
key_press()
time.sle
ep(3)
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector