- commit
- 389dedb4026c1dfa8edc25539c6db3154f0fdbd3
- parent
- 0bc7e236626394e682549815b26d7f1d483b3749
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-07-11 15:58
turn getch timeout into parameter
Diffstat
| M | boon.py | 4 | ++-- |
1 files changed, 2 insertions, 2 deletions
diff --git a/boon.py b/boon.py
@@ -80,11 +80,11 @@ def fullscreen(): 80 80 sys.stdout.flush() 81 81 82 8283 -1 def getch():-1 83 def getch(timeout=0.5): 84 84 # NOTE: result might contain more than one key 85 85 fd = sys.stdin.fileno() 86 86 try:87 -1 r, _w, _e = select.select([fd], [], [], 0.5)-1 87 r, _w, _e = select.select([fd], [], [], timeout) 88 88 except select.error: 89 89 return 90 90 with termios_reset(fd):