Skip to content Skip to sidebar Skip to footer

Connecting To Ftp With Python Specifying Port And Usn/passwd

I would like to specify the port to the ftp client, in addition to submitting a USN and password combination. The two options I've been trying look like this #no port specified ft

Solution 1:

The connection process makes more sense when broken down into pieces

import ftplib

# create a new FTP() instance
f = ftplib.FTP()

# connect to our FTP site
f.connect(host,port)

# log into the FTP site
f.login(username, password)

Post a Comment for "Connecting To Ftp With Python Specifying Port And Usn/passwd"