title: What is the difference between sys and os.sys
body: <p>What is the difference between <code>sys</code> and <code>os.sys</code> in python? I have seen many projects using <code>sys</code> when they have imported <code>os</code>. When I tried <code>dir(sys)</code> and <code>dir(os.sys)</code> they had same functions and their output was same.</p>
  
  <p>I often see code using <code>sys.exit</code> like this, rather than using <code>os.sys.exit</code>, but both do the same thing.</p>
  
  <pre><code>import os   
  import sys    
  sys.exit()
  </code></pre>