Why is the "file" command get confused on .py files?
        Posted  
        
            by 
                pythonic metaphor
            
        on Super User
        
        See other posts from Super User
        
            or by pythonic metaphor
        
        
        
        Published on 2011-02-23T23:11:33Z
        Indexed on 
            2011/02/23
            23:27 UTC
        
        
        Read the original article
        Hit count: 265
        
python
|file-command
I have several python modules that I've written.  Randomly, I used file on this directory, and I was really surprised by what I saw.  Here's the resulting count of what it thought the files were:
  1 ASCII Java program text, with very long lines
  1 a /bin/env python script text executable
  1 a python script text executable
  2 ASCII C++ program text
  4 ASCII English text
 18 ASCII Java program text
That's strange! Any idea what's going on or why it seems to think python modules are very often java files?
I'm using CentOS 5.2.
© Super User or respective owner