def write_file(filename, out_str):
    """
    Write the content of out_str to filename.
    """
    try:
        out_file = open(filename, "w")
        out_file.write(out_str)
        out_file.close()
    except __HOLE__:
        sys.stderr.write("{0:s}: error: cannot write to file {1:s}\n".format(sys.argv[0], filename))
        sys.exit(1)


# main function
###############################################################################
dataset/ETHPy150Open tpircher/pycrc/pycrc.py/write_file