title: Calling a .cmd script with os.system() doesn't work while the same command works in cmd terminal
body: <p>I am trying to call a simple .cmd script with the parameters. In a windows terminal, the command below works:</p>
  <pre><code>cmd /c &quot;&quot;C:\Users\Mathieu\Desktop\NeuroDecode\scripts\nd_stream_recorder.cmd&quot; &quot;C:\Users\Mathieu\Desktop&quot; &quot;test&quot;&quot;
  </code></pre>
  <p>However, using <code>os.system()</code> with the same command doesn't work.</p>
  <pre><code>os.system(r'cmd /c &quot;&quot;C:\Users\Mathieu\Desktop\NeuroDecode\scripts\nd_stream_recorder.cmd&quot; &quot;C:\Users\Mathieu\Desktop&quot; &quot;test&quot;&quot;')
  EOFError: EOF when reading a line
  </code></pre>
  <p>Could someone explain what my mistake is?</p>
  <p>Additionally, here is a more complete code snippet  I use:</p>
  <pre><code># -*- coding: utf-8 -*-
  
  import os
  import sys
  
  def start_recorder(directory, fname, neurodecode_path):
      if sys.platform.startswith('win'):
          script = os.path.join(neurodecode_path, 'scripts', 'nd_stream_recorder.cmd')
          script = script.replace('/', '\\')
          if directory.endswith('/'):
              directory = directory[:-1]
          elif directory.endswith('\\'):
              directory = directory[:-2]
          directory = directory.replace('/', '\\')
          os.system(f'cmd /c &quot;&quot;{script}&quot; &quot;{directory}&quot; &quot;{fname}&quot;&quot;')
      else:
          pass
  
  if __name__ == '__main__':
      directory = 'C:\\Users\\Mathieu\\Desktop'
      fname = 'test'
      neurodecode_path = 'C:/Users/Mathieu/Desktop/NeuroDecode'
      
      start_recorder(directory, fname, neurodecode_path)
  </code></pre>
  <p>I will also add that the execution of this CMD call should occur in a separate/new terminal.</p>