title: how to get the file path from Python GUI and use file path in another python program
body: <p>This is my <strong>main file</strong>:</p>
  
  <pre><code>ExcelAppl = win32com.client.Dispatch('Excel.Application')
      Workbook = ExcelAppl.Workbooks.Open('excel file path')
      Sheet = Workbook.Worksheets.Item(1)
  </code></pre>
  
  <p>This is the <strong>Python GUI</strong>:</p>
  
  <pre><code>root = Tk()
  def callback():
      file_path = tkFileDialog.askopenfilename(filetypes=[("Excel files","*.xls")])
      print "the file path  %s",file_path
      Text_button.insert(INSERT,file_path)
  def execute():
      execfile("MainLibrary.py")
  Browse_button = Button(text='Browse', command=callback).pack(side=LEFT, padx=10, pady=20, ipadx=20, ipady=10)
  Execution_button = Button(text='Convert', command=execute).pack(side=BOTTOM, padx=10, pady=20, ipadx=20, ipady=10)
  
  root.mainloop()
  </code></pre>
  
  <p>This is my query. I need to get the  <code>file_path</code> from the GUI and assign it to <code>Workbook = ExcelAppl.Workbooks.Open('excel file path')</code>. I need to get the path from the GUI and assign the path to my main code. Can anyone help?</p>