Answers for "python get temp directory path"

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

Code answers related to "python get temp directory path"

Python Answers by Framework

Browse Popular Code Answers by Language