title: Can we execute multiple commands in the same command prompt launched by python
body: <p>There is an excel file which contains the paths of multiple scenarios. I am using <code>os.system(command)</code> in a for loop. In each iteration, a path is read from excel file and executes the scenario for that path. </p>
  
  <p>My problem is that every time, by using <code>os.system()</code>, a CMD opens, execute one command and close. In next iteration, again second path is read and execute it and CMD close. Here CMD pop-ups again and again. And the system is busy during that period and not able to do other task. I want to execute all the commands(scenario) in one CMD because I would like to minimize it and use the system for other task.</p>
  
  <p>In each iteration, there are two main steps:</p>
  
  <ol>
  <li><code>os.chdir(PATH)</code></li>
  <li><code>os.system(path of exe+" "+name of config file that is present at PATH")</code></li>
  </ol>
  
  <p>Can it be done by using subprocess. If yes please give me some example how it can be implemented?</p>