Answers for "python tempfile directory"

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 tempfile directory"

Python Answers by Framework

Browse Popular Code Answers by Language