class_docstr: Simple wrapper around stdin.
class_docstr_tok: ["Simple","wrapper","around","stdin","."]
code: def __init__(self, stdin=None):
      self.stdin = stdin or sys.stdin
  
      # The input object should be a TTY.
      assert self.stdin.isatty()
  
      # Test whether the given input object has a file descriptor.
      # (Idle reports stdin to be a TTY, but fileno() is not implemented.)
      try:
          # This should not raise, but can return 0.
          self.stdin.fileno()
      except io.UnsupportedOperation:
          if "idlelib.run" in sys.modules:
              raise io.UnsupportedOperation(
                  "Stdin is not a terminal. Running from Idle is not supported."
              )
          else:
              raise io.UnsupportedOperation("Stdin is not a terminal.")
  
imports: from __future__ import unicode_literals
  from .utils import DummyContext, is_windows
  from abc import ABCMeta, abstractmethod
  from six import with_metaclass
  import io
  import os
  import sys
label_desc: Use image node_id 1 to create a new StdinInput object from inherited base classes: Input with example: obj = StdinInput(stdin)