我使用Python在一个操作中将文本块写入文件:
open(file, 'w').write(text)
如果脚本被中断,那么文件写入没有完成我想要没有文件而不是部分完整的文件.可以这样做吗?
python file-io atomic
atomic ×1
file-io ×1
python ×1