Re: Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-07 Thread Dustan
Fredrik Lundh wrote: > Dustan wrote: > > > Ok, that worked (was it plain w or the writelines/readlines that messed > > it up?). > > the plain "w"; very few image files are text files. > > > But Tkinter still can't find the image. I'm getting an error > > message: > > > > TclError: image "C:\Docume

Re: Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-06 Thread Fredrik Lundh
Dustan wrote: > Ok, that worked (was it plain w or the writelines/readlines that messed > it up?). the plain "w"; very few image files are text files. > But Tkinter still can't find the image. I'm getting an error > message: > > TclError: image "C:\Documents and [pathname snipped]" doesn't exi

Re: Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-06 Thread Dustan
Justin Ezequiel wrote: > cannot help you with Tkinter but... > > save=open("image.jpg","wb") > save.write(web_download.read()) > save.close() > > perhaps this would let you open the file in Paint Ok, that worked (was it plain w or the writelines/readlines that messed it up?

Re: Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-05 Thread Maric Michaud
Le Mardi 06 Juin 2006 03:08, Dustan a écrit : > > 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. using PIL, there is something like this (untested) : (assum

Re: Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-05 Thread Justin Ezequiel
cannot help you with Tkinter but... save=open("image.jpg","wb") save.write(web_download.read()) save.close() perhaps this would let you open the file in Paint -- http://mail.python.org/mailman/listinfo/python-list

Re: Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-05 Thread Dustan
I wrote: > 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): > web_download=self.opener.open(self.url) > save=open("image.jpg","w") > save.writelines(web_down

Again, Downloading and Displaying an Image from the Internet in Tkinter

2006-06-05 Thread Dustan
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): web_download=self.opener.open(self.url) save=open("image.jpg","w") save.writelines(web_download.readlines())