class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: This returns the terminal echo mode. This returns True if echo is
  on or False if echo is off. Child applications that are expecting you
  to enter a password often set ECHO False. See waitnoecho().
  
  Not supported on platforms where ``isatty()`` returns False.  
docstr_tok: ["This","returns","the","terminal","echo","mode",".","This","returns","True","if","echo","is","on","or","False","if","echo","is","off",".","Child","applications","that","are","expecting","you","to","enter","a","password","often","set","ECHO","False",".","See","waitnoecho","(",")",".","Not","supported","on","platforms","where","``","isatty","(",")","``","returns","False","."]
code: def getecho(self):
      """This returns the terminal echo mode. This returns True if echo is
      on or False if echo is off. Child applications that are expecting you
      to enter a password often set ECHO False. See waitnoecho().
  
      Not supported on platforms where ``isatty()`` returns False."""
  
      try:
          attr = termios.tcgetattr(self.fd)
      except termios.error as err:
          errmsg = "getecho() may not be called on this platform"
          if err.args[0] == errno.EINVAL:
              raise IOError(
                  err.args[0], "%s: %s." % (err.args[1], errmsg)
              )
          raise
  
      self.echo = bool(attr[3] & termios.ECHO)
      return self.echo
  
imports: import codecs
  import errno
  import fcntl
  import io
  import os
  import pty
  import resource
  import signal
  import struct
  import sys
  import termios
  import time
  from pty import STDIN_FILENO, CHILD
  from .util import which, PtyProcessError
label_desc: Use image node_id 12 for calling the PtyProcess obj's underlying member method code with example usage: obj.getecho() and returns: self