parameters: (self, obj)
docstring: Wraps the output stream, encoding Unicode strings with the specified encoding
docstring_summary: Wraps the output stream, encoding Unicode strings with the specified encoding
docstring_tokens: Wraps the output stream encoding Unicode strings with the specified encoding
function: def write(self, obj):
          """Wraps the output stream, encoding Unicode strings with the specified encoding"""
          if isinstance(obj, str):
              obj = obj.encode(self.encoding)
          try:
              self.out.buffer.write(obj)
          except OSError:
              pass
function_tokens: def write ( self , obj ) : if isinstance ( obj , str ) : obj = obj . encode ( self . encoding ) try : self . out . buffer . write ( obj ) except OSError : pass