title: Python 3 subprocess module throws error running "dir" on Windows
body: <p>This simple program in <code>Python 3</code> throws errors. What could be the reason? This problem arose after I installed/reinstalled <code>Python 3.5/3.6</code>. Also <code>Python 2.7</code> is installed on my PC (windows 10 machine).</p>
  
  <pre><code>import subprocess 
  out = subprocess.check_output(['dir'])
  </code></pre>
  
  <p>The error message: </p>
  
  <blockquote>
    <p>File "C:\Python36\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout</p>
    
    <p>File "C:\Python36\lib\subprocess.py", line 403, in run
        with Popen(*popenargs, **kwargs) as process:</p>
    
    <p>File "C:\Python36\lib\subprocess.py", line 707, in <strong>init</strong>
        restore_signals, start_new_session)</p>
    
    <p>File "C:\Python36\lib\subprocess.py", line 990, in _execute_child
        startupinfo)</p>
    
    <p>FileNotFoundError: [WinError 2] The system cannot find the file
    specified</p>
  </blockquote>