通过本文主要向大家介绍了无法创建临时文件夹,创建临时文件夹失败,java创建临时文件夹,创建临时文件夹,临时文件夹在哪个位置等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
本文实例讲述了python创建临时文件夹的方法。分享给大家供大家参考。具体实现方法如下:
import tempfile, os
tempfd, tempname = tempfile.mkstemp('.suffix')
os.write(tempfd, "aString")
# or, if you want a file-object: os.fdopen(tempfd, 'w+')
os.close(tempfd)
os.unlink(tempname)
</div>
希望本文所述对大家的Python程序设计有所帮助。
</div>
