Again, Downloading and Displaying an Image from the Internet in Tkinter
DustanGroups at gmail.com
Tue Jun 6 03:08:50 CEST 2006
> Nobody answered last time. I guess they wanted me to give it a shot.
> Well, here is how I download the image (it's a class method):
> def download_image(self):
> self.opener is urllib.URLopener(), self.url is the url for the image.
> I display the image as follows:
> t is Tkinter, path is sys.path.
> (if sys.path is not the proper way of getting the program's path,
> inform me; I hunted it down without any reference to look to)
> But the image won't display, using any application (including Tkinter,
> paint, Firefox, etc.). I'm assuming the reason it can't be read is
> because the image is protected from downloading.
> So, once again, is there a better way to download and display an image
> using Tkinter?
> Did I try hard enough for you? Are you going to help me this time?
I should probably also mention, the only reason I downloaded the image
to a file was because I don't know of any other way to do it. I feel no
need to save the image to my hard drive.
More information about the Python-list