Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

identifying the format of files

In linux, we have a utility called “file”, which helps us to determine the identification of a file. Is there any python module that can do the same job?

I don't prefer to use subprocess.Popen(['file', 'blah.blah']), because it is platform dependent. For instance, windows do not have “file” (although it can be downloaded).

like image 480
prgbenz Avatar asked Jan 19 '23 12:01

prgbenz


1 Answers

magic

Don't forget the DLL.

like image 70
Ignacio Vazquez-Abrams Avatar answered Jan 29 '23 16:01

Ignacio Vazquez-Abrams