def overwriteFile(file_path, text): f = codecs.open(file_path, 'r+', "utf-8-sig") f.seek(0) f.write(text) f.truncate() f.close()
def overwriteFile(file_path, text): f = codecs.open(file_path, 'r+', "utf-8-sig") f.seek(0) f.write(text) f.truncate() f.close()