mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Update jaraco.windows to v3.6:
Dependencies: * backports.functools-lru-cache 1.2.1 * jaraco.classes 1.3 * jaraco.collections 1.3.2 * jaraco.functools 1.11 * jaraco.structures 1.0 * jaraco.text 1.7 * jaraco.ui 1.4 * jaraco.windows 3.6 * more-itertools 2.2 * path.py 8.2.1 * six 1.10.0
This commit is contained in:
parent
f093fafd8d
commit
6bb4ae56bd
30 changed files with 6271 additions and 10 deletions
26
libs/jaraco/ui/input.py
Normal file
26
libs/jaraco/ui/input.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
"""
|
||||
This module currently provides a cross-platform getch function
|
||||
"""
|
||||
|
||||
try:
|
||||
# Windows
|
||||
from msvcrt import getch
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
# Unix
|
||||
import sys
|
||||
import tty
|
||||
import termios
|
||||
|
||||
def getch():
|
||||
fd = sys.stdin.fileno()
|
||||
old = termios.tcgetattr(fd)
|
||||
try:
|
||||
tty.setraw(fd)
|
||||
return sys.stdin.read(1)
|
||||
finally:
|
||||
termios.tcsetattr(fd, termios.TCSADRAIN, old)
|
||||
except ImportError:
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue