Added beep function

* Fixes issue #89
This commit is contained in:
2Shirt 2019-03-09 14:11:53 -07:00
parent d5dc453ffa
commit b0e2b01e00
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -115,6 +115,14 @@ def ask(prompt='Kotaero!'):
return answer
def beep(repeat=1):
"""Play system bell with optional repeat."""
for i in range(repeat):
# Print bell char
print('\a')
sleep(0.5)
def choice(choices, prompt='Kotaero!'):
"""Prompt the user with a choice question, returns str."""
answer = None