class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: Write bytes to the pseudoterminal.
  
  Returns the number of bytes written.
docstr_tok: ["Write","bytes","to","the","pseudoterminal",".","Returns","the","number","of","bytes","written","."]
code: def write(self, s, flush=True):
      """Write bytes to the pseudoterminal.
  
      Returns the number of bytes written.
      """
      return self._writeb(s, flush=flush)
  
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 17 for calling the PtyProcess obj's underlying member method code with example usage: obj.write(s, flush) and returns: self