what's the simplest way of detecting keyboard input in python from the terminal?,"termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)"