title: Run a .sh file with Python 3 Idle
body: <p>I am trying run a sh file with python 3. My .sh file will work on Terminal. My operating system is Raspbian. I try that code : </p>
  
  <pre><code>import time
  import os
  import subprocess
  
  # STEP 1
  text='sudo somecode'
  savefile=open('step1.sh','w')
  savefile.write(text)
  savefile.close()
  time.sleep(2)
  
  shellscript=subprocess.Popen(['./step1.sh'], stdin=subprocess.PIPE)
  </code></pre>
  
  <p>but it not works...</p>