I am trying to build a buzzer system for my office. We have old paddles that act as a keyboard and sends out 1-9. I am looking to take the digit that it puts out and state a name in python. I have it built but I cannot for the life of me find how to create a lockout for the buzzers I tried time.sleep but the consule is still taking keyboard input. Also I cannot find how to make it once a single digit is in the input field it will take that key press without the need to press enter. Any help or point in the correct direction would be great. FYI this is my first time with Python.
while(count != '0'):
buzz = input("\n Buzzers Ready: ")
if buzz == '1' and count > '0':
print(ply1)
time.sleep(5)
elif buzz == '2' and count > '1':
print(ply2)
time.sleep(5)
elif buzz == '3' and count > '2':
print(ply3)
time.sleep(5)
elif buzz == '4' and count > '3':
print(ply4)
time.sleep(5)
elif buzz == '5' and count > '4':
print(ply5)
time.sleep(5)
elif buzz == '6' and count > '5':
print(ply6)
time.sleep(5)
elif buzz == '7' and count > '6':
print(ply7)
time.sleep(5)
elif buzz == '8' and count > '7':
print(ply8)
time.sleep(5)
elif buzz == '9' and count > '8':
print(ply9)
time.sleep(5)
elif buzz == 'z':
break
else:
print("Non-Vaild Player.")