title: How to display an image using tkinter?
body: <p>I am trying to display an image to a tkinter window but every method i tried comes up with the error _tkinter.TclError: unexpected end of file</p>
  
  <pre><code>#my method
  
  from tkinter import *
  
  mainWindow = Tk()
  
  labelPicture = Label(mainWindow)
  labelPicture.img = PhotoImage(file = "file.png")
  labelPicture.config(image = labelPicture.img)
  labelPicture.place(in_ = mainWindow, x = 0, y = 0)
  </code></pre>