def dump(self, file_name, page_size=10, vtimeout=10, sep='\n'):
        fp = open(file_name, 'wb')
        n = 0
        l = self.get_messages(page_size, vtimeout)
        while l:
            for m in l:
                fp.write(m.get_body())
                if sep:
                    fp.write(sep)
                n += 1
            l = self.get_messages(page_size, vtimeout)
        fp.close()
        return n
Utility function to dump the messages in a queue to a file
dataset/ETHPy150Open darcyliu/storyboard/boto/sqs/queue.py/Queue.dump