I have create the temporary file using the tempfile.mkstemp()
and after creating this, I have get the unique path of the file inside the path
and now I want to delete the temporary file. My code is given below.
I have already visit this WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'new.dat' but did not solve my problem.
Code
import os
import tempfile
path=tempfile.mkstemp('.png', 'bingo',
'C:\\Users\\MuhammadUsman\\Documents\\PythonScripts\\Project')
os.unlink(path)
Error
PermissionError: [WinError 32] The process cannot access the file
because it is being used by another process:
'C:\\Users\\MuhammadUsman\\Documents\\PythonScripts\\Project\\bingois3q1b3u.png'