def write_to_file(expanded, targetfile):
    try:
        os.remove(targetfile)
    except IOError:
        pass
    except __HOLE__:
        pass
    f = open(targetfile, "w")
    f.write(str(expanded))
    f.close()
dataset/ETHPy150Open samth/pycket/pycket/expand_tofile.py/write_to_file