[File] Python Bytecode

Steve Grubb sgrubb at redhat.com
Thu Feb 13 18:43:53 UTC 2020


Hello,

I have one last observation that I'd like to share. In checking the system
for executables that match mime-type application/octet-stream, I'm finding
that all python bytecode files are detected as application/octet-stream. 

file --mime-type -b /usr/lib64/python3.7/site-packages/__pycache__/audit.cpython-37.pyc
application/octet-stream

I'm scratching my head, though. Because I notice that magic/Magdir/python has
all the magic numbers to correctly identify all shipping versions of python.

$ file -b /usr/lib64/python3.7/site-packages/__pycache__/audit.cpython-37.pyc
python 3.7 byte-compiled

I'm curious why it has octet-stream rather than application/x-bytecode.python?

Best Regards,
-Steve




More information about the File mailing list