[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 working (for me!) example:-


import urllib

paths = ["http://www.python.org/index.html";, ]



for remotepath in paths:
     # keep only last 10 chars (index.html)
     # for local file name
     localpath = remotepath[-10:]

     print remotepath, localpath

     urllib.urlretrieve(remotepath, localpath)


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to