FTP.login()
FTP.login() is a Python method in the Ftplib Module category. Logs in to the FTP server with username and password. The syntax is FTP.login(user="anonymous", passwd="", acct=""). Returns: Server response string. A typical example: ftp.login("myuser", "mypassword"). A close sibling is ftplib.FTP(), which creates an FTP client for file transfer. A close sibling is FTP.cwd(), which changes the current working directory on the FTP server. A close sibling is FTP.retrbinary(), which retrieves a file in binary mode from the FTP server. A close sibling is FTP.storbinary(), which uploads a file in binary mode to the FTP server. More about this category: FTP client — FTP, login, retrbinary, storbinary, nlst, cwd. Related Ftplib Module entries: ftplib.FTP(), FTP.cwd(), FTP.retrbinary(), FTP.storbinary(), FTP.nlst(), FTP.retrlines(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.