code: def write(self, s):
          
          b = s.encode(self.encoding)
          return super(PtyProcessUnicode, self).write(b)
docs: Write the unicode string ``s`` to the pseudoterminal.
  
          Returns the number of bytes written.