class_docstr: This class implements an ANSI (VT100) terminal.
  It is a stream filter that recognizes ANSI terminal
  escape sequences and maintains the state of a screen object. 
docstr: This puts a character at the current cursor position. The cursor
  position is moved forward with wrap-around, but no scrolling is done if
  the cursor hits the lower-right corner of the screen. 
docstr_tok: ["This","puts","a","character","at","the","current","cursor","position",".","The","cursor","position","is","moved","forward","with","wrap-around",",","but","no","scrolling","is","done","if","the","cursor","hits","the","lower-right","corner","of","the","screen","."]
code: def write_ch(self, ch):
      """This puts a character at the current cursor position. The cursor
      position is moved forward with wrap-around, but no scrolling is done if
      the cursor hits the lower-right corner of the screen."""
  
      if isinstance(ch, bytes):
          ch = self._decode(ch)
  
      # \r and \n both produce a call to cr() and lf(), respectively.
      ch = ch[0]
  
      if ch == "\r":
          self.cr()
          return
      if ch == "\n":
          self.crlf()
          return
      if ch == chr(screen.BS):
          self.cursor_back()
          return
      self.put_abs(self.cur_r, self.cur_c, ch)
      old_r = self.cur_r
      old_c = self.cur_c
      self.cursor_forward()
      if old_c == self.cur_c:
          self.cursor_down()
          if old_r != self.cur_r:
              self.cursor_home(self.cur_r, 1)
          else:
              self.scroll_up()
              self.cursor_home(self.cur_r, 1)
              self.erase_line()
  
imports: from .None import screen
  from .None import FSM
  import string
label_desc: Use image node_id 6 for calling the ANSI obj's underlying member method code with example usage: obj.write_ch(ch) without return types