Following is my python code to make a FTP connection
upload_ftp.py
import ftplib
ftp = ftplip.FTP()
ftp.connect('ip', 21)
print ftp.getwelcome()
try:
print "Logging in..."
ftp.login("username", "password")
except:
"failed to login"
but when i run the code ,i get the following error: NameError:name 'ftplib' is not defined
my@my-pc:/var/www$ python upload_ftp.py
Traceback (most recent call last):
File "upload_ftp.py", line 8, in <module>
ftp1 = ftplip.FTP()
NameError: name 'ftplip' is not defined
Any help would be appreciated..