'Generate and return data for `num` attachments'

def _attachments(self, num):

    data = {}
    files = ['bacon.jpg', 'bacon.txt']
    descriptions = ['mmm,    bacon', '']
    if (num > 0):
        for n in xrange(num):
            i = (0 if (n % 2) else 1)
            attachment = open(path.join(ATTACHMENTS_DIR, files[i]), 'r+')
            data.update({('attachment-%d-attachment' % n): attachment, ('attachment-%d-description' % n): descriptions[i]})
    return data
