i'm trying to access an ftp library using a python script the address of the library is something like this: ftp://XX.XXX.XXX.XXX/
so i used this code from pythonforbegginers :
import ftplib
ftp = ftplib.FTP('ftp.sunet.se', 'anonymous', 'anonymous@sunet.se')
print "File List: "
files = ftp.dir()
print files
and i tried to use it to suit my case like this:
ftp = ftplib.FTP('ftp.xx.xxx.xxx.xxx/','maklit' ,'maklit@xx.xxx.xxx.xxx/')
print ("File List: ")
files = ftp.dir()
print (files)
but i get the error : "for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11004] getaddrinfo failed "
how do i get it to work? what am i doing wrong? thanks.