code: def stdin_readable():
      
      if not WINDOWS:
          try:
              return bool(select([sys.stdin], [], [], 0)[0])
          except Exception:
              logger.log_exc()
      try:
          return not sys.stdin.isatty()
      except Exception:
          logger.log_exc()
      return False
docs: Determine whether stdin has any data to read.