class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: Helper method that wraps send() with mnemonic access for sending control
  character to the child (such as Ctrl-C or Ctrl-D).  For example, to send
  Ctrl-G (ASCII 7, bell, '')::
  
      child.sendcontrol('g')
  
  See also, sendintr() and sendeof().
docstr_tok: ["Helper","method","that","wraps","send","(",")","with","mnemonic","access","for","sending","control","character","to","the","child","(","such","as","Ctrl-C","or","Ctrl-D",")",".","For","example",",","to","send","Ctrl-G","(","ASCII","7",",","bell",",","'\u0007","'",")",":",":","child.sendcontrol","(","'","g","'",")","See","also",",","sendintr","(",")","and","sendeof","(",")","."]
code: def sendcontrol(self, char):
      """Helper method that wraps send() with mnemonic access for sending control
      character to the child (such as Ctrl-C or Ctrl-D).  For example, to send
      Ctrl-G (ASCII 7, bell, '\a')::
  
          child.sendcontrol('g')
  
      See also, sendintr() and sendeof().
      """
      char = char.lower()
      a = ord(char)
      if 97 <= a <= 122:
          a = a - ord("a") + 1
          byte = _byte(a)
          return self._writeb(byte), byte
      d = {
          "@": 0,
          "`": 0,
          "[": 27,
          "{": 27,
          "\\": 28,
          "|": 28,
          "]": 29,
          "}": 29,
          "^": 30,
          "~": 30,
          "_": 31,
          "?": 127,
      }
      if char not in d:
          return 0, b""
  
      byte = _byte(d[char])
      return self._writeb(byte), byte
  
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 18 for calling the PtyProcess obj's underlying member method code with example usage: obj.sendcontrol(char) and returns: self,  byte, self,  byte, int,  bytes