RosettaCodeData/Task/Secure-temporary-file/Python/secure-temporary-file-2.py
2023-07-01 13:44:08 -04:00

5 lines
103 B
Python

fd, path = tempfile.mkstemp()
try:
# use the path or the file descriptor
finally:
os.close(fd)