def prepare_paraview_script(script_path, files):
    '\n    Prepare a script to be run by ParaView from a template.\n\n    @param script_path: path of the new script to create\n    @param files: a list of data files path\n    @raise Exception: to its caller if any error occurs\n    '
    with open(PARAVIEW_SCRIPT_TEMPLATE, 'r') as fin:
        with open(script_path, 'w') as fout:
            for line in fin.readlines():
                fout.write((line.rstrip().replace('<parameter_files>', str(files)) + '\n'))
Prepare a script to be run by ParaView from a template.

@param script_path: path of the new script to create
@param files: a list of data files path
@raise Exception: to its caller if any error occurs
def prepare_paraview_script(script_path, files):
    '\n    Prepare a script to be run by ParaView from a template.\n\n    @param script_path: path of the new script to create\n    @param files: a list of data files path\n    @raise Exception: to its caller if any error occurs\n    '
    with open(PARAVIEW_SCRIPT_TEMPLATE, 'r') as fin:
        with open(script_path, 'w') as fout:
            for line in fin.readlines():
                fout.write((line.rstrip().replace('<parameter_files>', str(files)) + '\n'))