Re: Downloading files using urllib in a for loop?

2006-02-15 Thread justsee
ah - thanks for your help, but what is happening is the first line being returned contains the field names from the csv file! Schoolboy errors :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Downloading files using urllib in a for loop?

2006-02-15 Thread Martin Franklin
[EMAIL PROTECTED] wrote: > Thanks - but have printed and verified they are valid paths and > filenames. One correction to the code I listed: >theurl = imagepath[:-8] > > For some reason the values aren't being passed through > urllib.urlretrieve properly but this makes no sense to me? > A wo

Re: Downloading files using urllib in a for loop?

2006-02-15 Thread Martin Franklin
Martin Franklin wrote: > [EMAIL PROTECTED] wrote: >> Hi, >> I'm using Python 2.3 on Windows for the first time, and am doing >> something wrong in using urllib to retrieve images from urls embedded >> in a csv file. If I explicitly specify a url and image name it works >> fine(commented example in

Re: Downloading files using urllib in a for loop?

2006-02-15 Thread Fredrik Lundh
Martin Franklin wrote: > "No such file or directory: ''" sounds to me like you are trying > to open a file called '' (empty string) > > try adding some debugging > > print theimage, imagepath or, better: print repr(theimage), repr(imagepath) -- http://mail.python.org/mailman/listi

Re: Downloading files using urllib in a for loop?

2006-02-15 Thread justsee
Thanks - but have printed and verified they are valid paths and filenames. One correction to the code I listed: theurl = imagepath[:-8] For some reason the values aren't being passed through urllib.urlretrieve properly but this makes no sense to me? -- http://mail.python.org/mailman/listinfo/

Re: Downloading files using urllib in a for loop?

2006-02-15 Thread Martin Franklin
[EMAIL PROTECTED] wrote: > Hi, > I'm using Python 2.3 on Windows for the first time, and am doing > something wrong in using urllib to retrieve images from urls embedded > in a csv file. If I explicitly specify a url and image name it works > fine(commented example in the code), but if I pass in

Re: Downloading files using URLLib

2005-06-27 Thread Fuzzyman
> If so please guid me a bit here. I aaume you mean 'guido' here ? ;-) Anyway - you probably want to be using urllib2 as the other poster points out. Regards, Fuzzy -- http://mail.python.org/mailman/listinfo/python-list

Re: Downloading files using URLLib

2005-06-27 Thread A. Murat Eren
Hi, On Monday 27 June 2005 12:10, Oyvind Ostlund wrote: > I have to download a lot of files. And at the moment i am trying with > URLLib. But sometimes it doesn't download the whole file. It looks like it > stops half way through or something. Is it possible to ask for the file > size before you