diff options
author | nfnty <git@nfnty.se> | 2016-12-21 05:06:55 +0100 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2017-01-17 05:59:02 +0100 |
commit | b3d031a913814900467358b2adf20a148bf6de1a (patch) | |
tree | 6f5b435817ec9cbe850fb73485a7e6c77da28c14 /doc/tools/print_keys.py | |
parent | 76791a70467d7223a966aa9f12f5583b01d704a8 (diff) | |
download | ranger-b3d031a913814900467358b2adf20a148bf6de1a.tar.gz |
linting: pylint and flake8
Diffstat (limited to 'doc/tools/print_keys.py')
-rwxr-xr-x | doc/tools/print_keys.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/doc/tools/print_keys.py b/doc/tools/print_keys.py index 73091db4..cf915591 100755 --- a/doc/tools/print_keys.py +++ b/doc/tools/print_keys.py @@ -3,18 +3,19 @@ You can use this tool to find out values of keypresses """ -from curses import * +import curses -sep = '; ' +SEPARATOR = '; ' -@wrapper -def main(w): - mousemask(ALL_MOUSE_EVENTS) - mouseinterval(0) + +@curses.wrapper +def main(window): + curses.mousemask(curses.ALL_MOUSE_EVENTS) + curses.mouseinterval(0) while True: - ch = w.getch() - if ch == KEY_MOUSE: - w.addstr(repr(getmouse()) + sep) + char = window.getch() + if char == curses.KEY_MOUSE: + window.addstr(repr(curses.getmouse()) + SEPARATOR) else: - w.addstr(str(ch) + sep) + window.addstr(str(char) + SEPARATOR) |