RosettaCodeData/Task/Secure-temporary-file/Python/secure-temporary-file-2.py
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

5 lines
103 B
Python

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