title: Using 7-zip cmd line from Python with subprocess
body: <p>I am trying to run 7zip through a command line code from a Python script using subprocess library.</p>
  
  <p>The code below works fine when I use it directly in the command line. However, I am not capable to make it run with subprocess.</p>
  
  <pre><code>set path="C:\Program Files\7-Zip\";%path%
  7z x C:\\Users\\ferro\\Desktop\\teste.zip -pabc123 -oC:\\Users\\ferro\\Desktop -aos -y
  </code></pre>
  
  <p>The current code I am trying to execute is the following.</p>
  
  <pre><code>    import subprocess
      import os
  
      os.system('set path="C:\Program Files\7-Zip\";%path%')
      command01 = ['7z', 'x', 'C:\\Users\\ferro\\Desktop\\teste.zip', '-p', 'abc123', '-o', 'C:\\Users\\ferro\\Desktop', '-aos', '-y']
  
      subprocess.call(command01)
  </code></pre>
  
  <p>The error message is "<strong><em>FileNotFoundError: [WinError 2]</em></strong>"</p>
  
  <p>Does anyone know where is my mistake?</p>