title: how to open a new bash window from python and insert commands into the new bash window
body: <p>I have been attempting, with little success, to open a terminal or konsole window from python and to insert commands into the terminal or konsole window.</p>
  
  <p>So far, I have the following:</p>
  
  <pre><code>import os
  
  os.system('konsole')
  </code></pre>
  
  <p>I cannot seem to figure out how to pipe the commands from the python prompt window to the terminal or konsole window.</p>
  
  <p>This may help. I am trying to run commands from python into R (stats programming language).  i.e. open konsole from python -> have letter R typed into the konsole so that R will start in the konsole -> insert R commands, coded in a python script, into the konsole running R.  If anyone has an easier idea could you please share. </p>
  
  <p>Many thanks.</p>