class_docstr: This is like pexpect.spawn but allows you to supply your own open file
  descriptor. For example, you could use it to read through a file looking
  for patterns, or to control a modem or serial device. 
class_docstr_tok: ["This","is","like","pexpect.spawn","but","allows","you","to","supply","your","own","open","file","descriptor",".","For","example",",","you","could","use","it","to","read","through","a","file","looking","for","patterns",",","or","to","control","a","modem","or","serial","device","."]
docstr: This checks if the file descriptor is still valid. If :func:`os.fstat`
  does not raise an exception then we assume it is alive. 
docstr_tok: ["This","checks","if","the","file","descriptor","is","still","valid",".","If",":","func",":","`","os.fstat","`","does","not","raise","an","exception","then","we","assume","it","is","alive","."]
code: def isalive(self):
      """This checks if the file descriptor is still valid. If :func:`os.fstat`
      does not raise an exception then we assume it is alive."""
  
      if self.child_fd == -1:
          return False
      try:
          os.fstat(self.child_fd)
          return True
      except:
          return False
  
file_path: catboost/contrib/python/pexpect/py2/pexpect/fdpexpect.py
imports: from .spawnbase import SpawnBase
  from .exceptions import ExceptionPexpect, TIMEOUT
  from .utils import select_ignore_interrupts, poll_ignore_interrupts
  import os
label_desc: Use image node_id 3 for calling the fdspawn obj's underlying member method code with example usage: obj.isalive() and returns: False, True, False