title: python subprocess module call method
body: <p>I'm having problems with <code>call</code> method in the <code>subprocess</code> module while executing multiple commands in a single script. The following code works just fine:</p>
  
  <pre><code>subprocess.call('ifconfig eth0 down', shell=True)
  subprocess.call('ifconfig eth0 hw ether 00:99:99:99:99:99', shell=True)
  subprocess.call('ifconfig eth0 up', shell=True)
  </code></pre>
  
  <p>But from some source I found out the following code which is said to work fine but isn't working with me:</p>
  
  <pre><code>subprocess.call(['ifconfig eth0 down'])
  subprocess.call(['ifconfig eth0 hw ether 00:99:99:99:99:99'])
  subprocess.call(['ifconfig eth0 up'])
  </code></pre>
  
  <p>In my case it gives the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "new.py", line 3, in &lt;module&gt;
      subprocess.call(['ifconfig eth0 down'])
    File "/home/anaconda3/lib/python3.7/subprocess.py", line 339, in call
      with Popen(*popenargs, **kwargs) as p:
    File "/home/anaconda3/lib/python3.7/subprocess.py", line 800, in __init__
      restore_signals, start_new_session)
    File "/home/anaconda3/lib/python3.7/subprocess.py", line 1551, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: 'ifconfig eth0 down': 'ifconfig eth0 down'
  </code></pre>
  
  <p>Anyone has any idea what might be the issue. Thanks in advance.</p>