def write_file(self, respiter): if not self.sendfile(respiter): for item in respiter: self.write(item)