'Make a temporary file to parse'

def __make_temp_file(self, file):

    write_file = 'rtf_write_file'
    read_obj = (file if hasattr(file, 'read') else open(file, 'r'))
    with open(write_file, 'wb') as write_obj:
        for line in read_obj:
            write_obj.write(line)
    return write_file
