urllib.urlretrieve and PASV mode

Ben Hutchings do-not-spam-ben.hutchings at businesswebsoftware.com
Wed Mar 26 13:24:04 CET 2003

In article <3e7b3eba.90530195 at news.zianet.com>, Mats Wichmann wrote:
> Is there a way when using urllib.urlretrieve() to
> use passive mode for ftp transfers?  It looks like
> this is supported in ftplib (set_pasv method),
> but not used by urllib. Unless I'm missing something.

In Python 2.2, the initial setting of passive mode in new FTP objects
is controlled by the class attribute ftplib.FTP.passiveserver, which
is initially set to 1.  Python 2.1's ftplib also defaults to passive
mode.  Unless you're using an earlier version, you shouldn't need to
do anything special.

More information about the Python-list mailing list