(fd, when=TCSAFLUSH)
Put terminal into a cbreak mode.
Put terminal into a cbreak mode.
Put terminal into a cbreak mode .
def setcbreak(fd, when=TCSAFLUSH):
    """Put terminal into a cbreak mode."""
    mode = tcgetattr(fd)
    mode[LFLAG] = mode[LFLAG] & ~(ECHO | ICANON)
    mode[CC][VMIN] = 1
    mode[CC][VTIME] = 0
    tcsetattr(fd, when, mode)
def setcbreak ( fd , when = TCSAFLUSH ) : mode = tcgetattr ( fd ) mode [ LFLAG ] = mode [ LFLAG ] & ~ ( ECHO | ICANON ) mode [ CC ] [ VMIN ] = 1 mode [ CC ] [ VTIME ] = 0 tcsetattr ( fd , when , mode )