urlretrieve a file whose name has spaces in it

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Tue Jul 29 18:57:19 EDT 2003


HP wrote:
> urllib.urlretrieve("http://website.com/path/string string1 foo.doc",
> "local_file");
> 

Try

urllib.urlretrieve(urllib.quote("http://website.com/path/string string1 foo.doc"), "local_file")

instead.

And what is the semicolon doing there? ;-)

--Irmen





More information about the Python-list mailing list