parameters: (cls, stdout, true_color=False, ansi_colors_only=None, term=None)
return_statement: return cls(stdout, get_size, true_color=true_color,
                     ansi_colors_only=ansi_colors_only, term=term)
docstring: Create an Output class from a pseudo terminal.
          (This will take the dimensions by reading the pseudo
          terminal attributes.)
docstring_summary: Create an Output class from a pseudo terminal.
          (This will take the dimensions by reading the pseudo
          terminal attributes.)
docstring_tokens: Create an Output class from a pseudo terminal . ( This will take the dimensions by reading the pseudo terminal attributes . )
function: def from_pty(cls, stdout, true_color=False, ansi_colors_only=None, term=None):
          """
          Create an Output class from a pseudo terminal.
          (This will take the dimensions by reading the pseudo
          terminal attributes.)
          """
          assert stdout.isatty()
          def get_size():
              rows, columns = _get_size(stdout.fileno())
              # If terminal (incorrectly) reports its size as 0, pick a reasonable default.
              # See https://github.com/ipython/ipython/issues/10071
              return Size(rows=(rows or 24), columns=(columns or 80))
  
          return cls(stdout, get_size, true_color=true_color,
                     ansi_colors_only=ansi_colors_only, term=term)
function_tokens: def from_pty ( cls , stdout , true_color = False , ansi_colors_only = None , term = None ) : assert stdout . isatty ( ) def get_size ( ) : rows , columns = _get_size ( stdout . fileno ( ) ) # If terminal (incorrectly) reports its size as 0, pick a reasonable default. # See https://github.com/ipython/ipython/issues/10071 return Size ( rows = ( rows or 24 ) , columns = ( columns or 80 ) ) return cls ( stdout , get_size , true_color = true_color , ansi_colors_only = ansi_colors_only , term = term )