By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,825 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,825 IT Pros & Developers. It's quick & easy.

PhotoImage problem

P: n/a
hi
I am using Python 2.5.1. In my code i want to use
self.myimage=PhotoImage (file=self.myfile)

so i can create the image in a canvas
self.mycanv.create_image(70,100,image=self.myimg)

it works when i add,
from ImageTk import PhotoImage

but this import caused an error message when i tried to run this in a
friend's linux machine that had python and PIL. Is PhotoImage part of
standard python library?In new versions of python do i have to modify
this import statement in anyway?

thanks
jim
Jun 30 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
---------- Forwarded message ----------
From: Guilherme Polo <gg****@gmail.com>
Date: Mon, Jun 30, 2008 at 1:00 PM
Subject: Re: PhotoImage problem
To: jimgardener <ji*********@gmail.com>
On Mon, Jun 30, 2008 at 12:02 PM, jimgardener <ji*********@gmail.comwrote:
hi
I am using Python 2.5.1. In my code i want to use
self.myimage=PhotoImage (file=self.myfile)

so i can create the image in a canvas
self.mycanv.create_image(70,100,image=self.myimg)

it works when i add,
from ImageTk import PhotoImage

but this import caused an error message when i tried to run this in a
friend's linux machine that had python and PIL. Is PhotoImage part of
standard python library?In new versions of python do i have to modify
this import statement in anyway?
PhotoImage is a class in the Tkinter module, so if you have from
Tkinter import * and from ImageTk import PhotoImage it is very
possible that you will have problems.
>
thanks
jim
--
http://mail.python.org/mailman/listinfo/python-list

--
-- Guilherme H. Polo Goncalves
Jun 30 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.