[Tutor] educational
MICHAEL BASHAGI
myakayebashagi at gmail.com
Sun Mar 9 05:32:23 CET 2014
i wanted to use a .jpeg image file on a label in a small program that am
building in Python, i use Window 7 professional OS, and Python 3.4....here
are my codes:-
import sys
from tkinter import *
#Window
mGui=Tk()
mGui.geometry("1000x500")
mGui.title("Kamusi")
#Functions
#Variables
ment=StringVar()
#Images
image = Image.open("logo.jpg")
photo = ImageTk.PhotoImage(image)
#Widgets
Logo=Label(mGui,image=photo,width=510,height=150)
Logo.grid(row=0,column=3)
when i run those codes i get this error message:-
AttributeError: type object 'Image' has no attribute 'open'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140309/0eaacad6/attachment.html>
More information about the Tutor
mailing list