parameters: (self, data)
docstring: write()' callable as specified by PEP 333
docstring_summary: write()' callable as specified by PEP 333
docstring_tokens: write () callable as specified by PEP 333
function: def write(self, data):
          """'write()' callable as specified by PEP 333"""
  
          assert type(data) is StringType,"write() argument must be string"
  
          if not self.status:
              raise AssertionError("write() before start_response()")
  
          elif not self.headers_sent:
              # Before the first output, send the stored headers
              self.bytes_sent = len(data)    # make sure we know content-length
              self.send_headers()
          else:
              self.bytes_sent += len(data)
  
          # XXX check Content-Length and truncate if too many bytes written?
          self._write(data)
          self._flush()
function_tokens: def write ( self , data ) : assert type ( data ) is StringType , "write() argument must be string" if not self . status : raise AssertionError ( "write() before start_response()" ) elif not self . headers_sent : # Before the first output, send the stored headers self . bytes_sent = len ( data ) # make sure we know content-length self . send_headers ( ) else : self . bytes_sent += len ( data ) # XXX check Content-Length and truncate if too many bytes written? self . _write ( data ) self . _flush ( )