title: calling a python script on button click using python and tkinter
body: <p>I have a python script which has the functionality of sending an email to a user. I executed this script and it is working fine. In  another python script I have only a button, so when I click on this button I want the other python script which sends a email to be executed.I have written the following code:</p>
  
  <pre><code>#!/usr/bin/python
  import sys
  import os
  import Tkinter
  import tkMessageBox
  top=Tkinter.Tk()
  
  def helloCallBack():
      os.system('SendEmail.py')
  
  B=Tkinter.Button(top,text="hello",command= helloCallBack)
  B.pack()
  top.mainloop()
  </code></pre>
  
  <p>I get the following error when I click on the button:</p>
  
  <p>sh: 1:SendEmail.py:not found.</p>
  
  <p>Could you let me know what is the reason for this error and how it can be resolved.Thanks.</p>