def _send(self, s):
        if not self.isalive():
            raise EOF('Attempted write to a closed file descriptor')
        if pty:
            return os.write(self.child_fd, s)
        else:
            try:
                    return os.write(self.write_fd, s)
            except __HOLE__ as e:
                    if e.errno == errno.EINVAL:
                            raise EOF('Attempted write to a closed file descriptor')
                    else:
                            raise(e)
dataset/ETHPy150Open Calysto/metakernel/metakernel/pexpect.py/spawn._send