python - Develop GUI window -
it needs display picture on left , first , last name along birthdate on right side. have far, keeps giving me tcl error saying "no such file or directory" when have file saved onto computer.
from tkinter import tk,label,photoimage,left,right root=tk() text=label(root, text="first name: justin\n" "last name: joseph\n" "date of birth:02/17/1995") text.pack(side=right) justin=photoimage(file="justin.gif") justinlabel=label(root, image=justin) justinlabel.pack(side=left)
the problem has line:
justin=photoimage(file="justin.gif")
make sure justin.gif located in right place in file hierarchy (same directory script itself) , called 'justin.gif' (capitalization sensitive).
Comments
Post a Comment