os.command giving Attribute error
Question: Hi I am trying to rum a C *.o using python 2.6.5 as follows

    
    
    import os
    import sys
    file_type = os.command('./file_type.o %s.txt 2>&1' % file_name)
    

And, it gives the error message :

    
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'command'
    

Being a beginner this might be a very trivial question, I request for the
direction / help.


Answer: There is no function named `command` in the `os` module, hence the error. You
probably meant to call
[`os.system()`](https://docs.python.org/2/library/os.html#os.system) instead.

