title: Why use Python's os module methods instead of executing shell commands directly?
body: <p>I am trying to understand what is the motivation behind using Python's library functions for executing OS-specific tasks such as creating files/directories, changing file attributes, etc. instead of just executing those commands via <code>os.system()</code> or <code>subprocess.call()</code>?</p>
  
  <p>For example, why would I want to use <code>os.chmod</code> instead of doing <code>os.system("chmod...")</code>? </p>
  
  <p>I understand that it is more "pythonic" to use Python's available library methods as much as possible instead of just executing shell commands directly. But, is there any other motivation behind doing this from a functionality point of view? </p>
  
  <p>I am only talking about executing simple one-line shell commands here. When we need more control over the execution of the task, I understand that using <code>subprocess</code> module makes more sense, for example.</p>