class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: Return the window size of the pseudoterminal as a tuple (rows, cols).
          
docstr_tok: ["Return","the","window","size","of","the","pseudoterminal","as","a","tuple","(","rows",",","cols",")","."]
code: def getwinsize(self):
      """Return the window size of the pseudoterminal as a tuple (rows, cols)."""
      TIOCGWINSZ = getattr(termios, "TIOCGWINSZ", 1074295912)
      s = struct.pack("HHHH", 0, 0, 0, 0)
      x = fcntl.ioctl(self.fd, TIOCGWINSZ, s)
      return struct.unpack("HHHH", x)[0:2]
  
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 26 for calling the PtyProcess obj's underlying member method code with example usage: obj.getwinsize() and returns: struct