def activate_printanswers(texfile):
    """ Activate printanswers mod in texfile """
    output_fname = 'corr_' + texfile
    with open(texfile, 'r') as input_f:
        with open(output_fname, 'w') as output_f:
            for line in input_f.readlines():
                output_f.write(line.replace('solution/print = false',
                    'solution/print = true'))
    return output_fname
