title: Subprocess error in python
body: <pre><code>from subprocess import Popen,PIPE
  from Tkinter import *
  root=Tk()
  calc=Frame(root)
  calc.grid()
  root.title("Calculator")
  bt=Button(calc,text="3")
  bt.grid()
  process=subprocess.Popen(['python','imacap.py'],stderr=subprocess.STDOUT,  stdout=subprocess.PIPE)
  </code></pre>
  
  <p>In given code I created GUI using tkinter in python. While displaying GUI app, I want to run camera capturing app at the same time so after googling it I found solution of using subprocess.Popen. So I created imacap.py and used in it. But now I am facing error as Traceback (most recent call last):</p>
  
  <blockquote>
    <p>File "/home/mukund/testa.py", line 9, in 
    process=subprocess.Popen(['python','imacap.py'],
    stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
    NameError: name 'subprocess' is not defined</p>
  </blockquote>