title: I'm trying to open any program file via python
body: <p>I'm trying to open a file via my python project, but it doesn't work.. Is there any reason why?</p>
  
  <pre><code>import os
  from tkinter import *
  from tkinter import filedialog
  from PIL import ImageTk,Image
  
  def openfile():
  
     window.filename = filedialog.askopenfilename(initialdir="Open file", filetypes=(("exe files", "*.exe"),("all files", "*.*"))
      file_opener = open(window.filename)
      file_opener.read()
  
  Button = Button(window, text="Open", command=openfile)
  Button.pack()
  </code></pre>