[Tutor] Best way to do FTP login?

boB Stepp robertvstepp at gmail.com
Fri Jun 17 12:45:38 EDT 2016


I could do this:

from ftplib import FTP

ftp = FTP('ip_address', 'username', 'password')

Or, I could do this:

ftp = FTP('ip_address')
ftp.login('username', 'password')

Most of the examples I am seeing online use the second approach.  Is
there some reason why this is to be preferred?

TIA!

-- 
boB


More information about the Tutor mailing list