📜  python 临时目录 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:51.005000             🧑  作者: Mango

代码示例1
Use the mkdtemp() function from the tempfile module:

import tempfile
import shutil

dirpath = tempfile.mkdtemp()
# ... do stuff with dirpath
shutil.rmtree(dirpath)