abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
getch._GetchUnix Class Reference

Public Member Functions

def __init__
 
def __call__
 

Detailed Description

Definition at line 13 of file getch.py.

Constructor & Destructor Documentation

def getch._GetchUnix.__init__ (   self)

Definition at line 14 of file getch.py.

14 
15  def __init__(self):
16  import tty, sys
def __init__
Definition: getch.py:14

Member Function Documentation

def getch._GetchUnix.__call__ (   self)

Definition at line 17 of file getch.py.

17 
18  def __call__(self):
19  import sys, tty, termios
20  fd = sys.stdin.fileno()
21  old_settings = termios.tcgetattr(fd)
22  try:
23  tty.setraw(sys.stdin.fileno())
24  ch = sys.stdin.read(1)
25  finally:
26  termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
27  return ch
28 
def __call__
Definition: getch.py:17

The documentation for this class was generated from the following file: