Re: Problem using urllib to download images

2008-11-03 Thread tstrogen
> That's because you downloaded some HTML and saved it in a file named > logo.gif. That's unlikely to work in any image viewing program. Try > opening the file you downloaded in a text editor and you'll see. > > -- > Jerry Aha, so the first param is the file, and second is the name you save the

Re: Problem using urllib to download images

2008-11-03 Thread Jerry Hill
On Mon, Nov 3, 2008 at 2:21 PM, <[EMAIL PROTECTED]> wrote: > Then perhaps it's a problem with my os. > [TERMINAL SESSION] > [18:16:33 Mon Nov 03] python > Python 2.6 (trunk:66714:66715M, Oct 1 2008, 18:36:04) > [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin > Type "help", "copyright", "c

Re: Problem using urllib to download images

2008-11-03 Thread tstrogen
Then perhaps it's a problem with my os. [TERMINAL SESSION] [18:16:33 Mon Nov 03] python Python 2.6 (trunk:66714:66715M, Oct 1 2008, 18:36:04) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> url = '

Re: Problem using urllib to download images

2008-11-03 Thread [EMAIL PROTECTED]
On Nov 3, 11:48 am, [EMAIL PROTECTED] wrote: > I am using Python 2.6 on Mac OS 10.3.9. > I have been trying to use: > image = urllib.URLopener() > image.retrieve(url, filename) > to download images from websites. I am able to do so, and end up with > the appropriate file. However, when I try to ope

Problem using urllib to download images

2008-11-03 Thread tstrogen
I am using Python 2.6 on Mac OS 10.3.9. I have been trying to use: image = urllib.URLopener() image.retrieve(url, filename) to download images from websites. I am able to do so, and end up with the appropriate file. However, when I try to open the file, I get an error message. It's something about