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)
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)