pefile
pefile copied to clipboard
Fail to delete file after pefile?
after i use pefile, found fail to delete control_file
- control_file=os.path.join(tempfolder, myfile) pe = pefile.PE(control_file) check some digital sign information
- and then try to delete the tmp file by using os.remove(myfile) or shutil.rmtree(tempfolder) i got windows error 32, fail to remove file
i guess i have to use pe.close before remove my file, but still fail. any ideas about this issue? thank you!
pefile uses mmap to access the file. You will likely need to pe.close(), or exit the process before you can delete the file.
Same problem here. pe.close() worked for me