FTP with urllib2 behind a proxy

John J. Lee jjl at pobox.com
Sat Aug 9 16:25:07 CEST 2003


Zappelphillip at gmx.de (O. Koch) writes:

> Until now, i know that ftplib doesn't support proxies and that i have
> to use urllib2. But i don't know how to use the urllib2 correct. I
> found some examples, but i don't understand them.
> 
> Is there anyone who can help me?

import urllib2
response = urllib2.urlopen("ftp://ftp.example.com/pub/myfile")
data = response.read()
response.close()


Does that do the trick?


John




More information about the Python-list mailing list