Trivial modifications (thou shalt not judge people by trivial commits)

This commit is contained in:
Miroslav Stampar
2018-05-03 14:10:55 +02:00
parent 8f7a7bed20
commit 2a810fb796
18 changed files with 49 additions and 41 deletions

View File

@@ -22,7 +22,6 @@ class _Getch(object):
def __call__(self):
return self.impl()
class _GetchUnix(object):
def __init__(self):
__import__("tty")
@@ -41,7 +40,6 @@ class _GetchUnix(object):
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
return ch
class _GetchWindows(object):
def __init__(self):
__import__("msvcrt")
@@ -50,7 +48,6 @@ class _GetchWindows(object):
import msvcrt
return msvcrt.getch()
class _GetchMacCarbon(object):
"""
A function which returns the current ASCII key that is down;
@@ -79,5 +76,4 @@ class _GetchMacCarbon(object):
(what, msg, when, where, mod) = Carbon.Evt.GetNextEvent(0x0008)[1]
return chr(msg & 0x000000FF)
getch = _Getch()