def check(): # returns False if there is a problem initializing the state import termios try: _get_reader() except termios.error: return False return True
def check(): # returns False if there is a problem initializing the state try: _get_reader() except _error: return False return True