[Zope] AttributeError: sendall when using ftplib with Zope 2.5.1
Jeff Kowalczyk
jtk@yahoo.com
Mon, 18 Nov 2002 00:07:11 -0500
The ftplib that came with my Zope 2.5.1 win32 is giving an error on socket's sendall
method. Is there anything I'm doing wrong, or is it a bug in this particular version or my
installation? Thanks.
C:\Program Files\Zope>bin\python.exe
Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> from ftplib import FTP
>>> ftp = FTP('localhost')
>>> ftp.login()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Program Files\Zope/bin/lib\ftplib.py", line 317, in login
resp = self.sendcmd('USER ' + user)
File "C:\Program Files\Zope/bin/lib\ftplib.py", line 228, in sendcmd
self.putcmd(cmd)
File "C:\Program Files\Zope/bin/lib\ftplib.py", line 163, in putcmd
self.putline(line)
File "C:\Program Files\Zope/bin/lib\ftplib.py", line 158, in putline
self.sock.sendall(line)
File "<string>", line 1, in sendall
AttributeError: sendall
>>>
But it works fine on my Python2.2 on the same machine, in a different dir.
PythonWin 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond@skippinet.com.au) - see 'Help/About
PythonWin' for further copyright information.
>>> from ftplib import FTP
>>> ftp = FTP('localhost')
>>> ftp.login()
'230 Anonymous user logged in.'
>>> ftp.retrlines('LIST')
'226 Transfer complete.'
>>>
What's New in Python 2.1.2 (rc1)?
=================================
- The socket object gained a new method, 'sendall()'. This method
is guaranteed to send all data - this is not guaranteed by the
'send()' method. See also SF patch #474307. The standard library
has been updated to use this method where appropriate.
My _socket.pyd has the following signature:
36.0 KB (36,927 bytes)
Thursday, May 31, 2001, 8:02:06 AM
I'm presuming it is the original that comes with Zope 2.5.1