def save_to_file(self, fp, sep='\n'):
        n = 0
        m = self.read()
        while m:
            n += 1
            fp.write(m.get_body())
            if sep:
                fp.write(sep)
            self.delete_message(m)
            m = self.read()
        return n
Read all messages from the queue and persist them to file-like object.
dataset/ETHPy150Open darcyliu/storyboard/boto/sqs/queue.py/Queue.save_to_file