'Destructively dump the contents of the queue into fname.'

def dumpfname(self, fname, truncate=False):

    if truncate:
        with file(fname, 'w+') as f:
            self.dump(f)
    else:
        with file(fname, 'a+') as f:
            self.dump(f)
