def log(self,code):
        """Write a trace of the request on stderr"""
        if HTTP.logging:
            date_str = datetime.datetime.now().strftime('[%d/%b/%Y %H:%M:%S]')
            sys.stderr.write('%s - - %s "%s" %s\n' %(self.host,
                date_str,self.requestline,code))
Write a trace of the request on stderr
recipes/Python/511454_asynchronous_HTTP_server_CGI/recipe-511454.py