#NEWLINE# def setResponseCode( self , code , message = None ) : #NEWLINE# #INDENT# '\n        Set the HTTP status response code, but takes care that this is called\n        before any data is written.\n        ' #NEWLINE# assert ( not self . written ) , ( 'Response code cannot be set after data has been written: %s.' % '@@@@' . join ( self . written ) ) #NEWLINE# self . responseCode = code #NEWLINE# self . responseMessage = message