Answers for "python temp folder"

0

python temp directory

Use the mkdtemp() function from the tempfile module:

import tempfile
import shutil

dirpath = tempfile.mkdtemp()
# ... do stuff with dirpath
shutil.rmtree(dirpath)
Posted by: Guest on March-20-2021

Python Answers by Framework

Browse Popular Code Answers by Language