[Python-Dev] Remove tempfile.mktemp()

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 21 00:16:20 EDT 2019


Antoine Pitrou wrote:
> On Wed, 20 Mar 2019 11:25:53 +1300
> Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
>>So use NamedTemporaryFile(delete = False) and close it before passing
>>it to the other program.
> 
> How is it more secure than using mktemp()?

It's not, but it solves the problem someone suggested of another
program not being able to access and/or delete the file.

-- 
Greg


More information about the Python-Dev mailing list