识别文件的格式

prg*_*enz 4 python file identification imghdr

在linux中,我们有一个名为"file"的实用程序,它可以帮助我们确定文件的标识.有没有可以做同样工作的python模块?

我不喜欢使用subprocess.Popen(['file', 'blah.blah']),因为它取决于平台.例如,Windows没有"文件"(虽然可以下载).

Ign*_*ams 7

magic

不要忘记DLL.