ftplib help
Driver, David
DDriver at covercraft.com
Mon Jun 16 14:21:25 EDT 2003
I need to FTP to a site on a non standard port. so I break out with the
Global Module Index and look at the example in ftplib. It doesn't specify a
port option so I just include it with the host parameter. All looks well
until I execute the line and I get the following:
>>> from ftplib import FTP
>>> uid = 'myUserId'
>>> pwd = 'myPassword'
>>> srvr = '10.1.1.100:2109'
>>> f = FTP(srvr,uid,pwd)
Traceback (most recent call last):
File "<pyshell#7>", line 1, in ?
f = FTP(srvr,uid,pwd)
File "C:\Python23\lib\ftplib.py", line 107, in __init__
self.connect(host)
File "C:\Python23\lib\ftplib.py", line 117, in connect
for res in socket.getaddrinfo(self.host, self.port, 0,
socket.SOCK_STREAM):
gaierror: (7, 'getaddrinfo failed')
>>>
Am I doing something wrong? Do I need to use a lower level protocol
interface? Any help is appreciated.
More information about the Python-list
mailing list