[Python-bugs-list] [ python-Bugs-630670 ] 'sendall' missing in 2.1.3 _socket.pyd
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 30 Oct 2002 12:07:05 -0800
Bugs item #630670, was opened at 2002-10-29 14:38
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=630670&group_id=5470
Category: Windows
Group: Platform-specific
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Hamish Lawson (hamishlawson)
Assigned to: Tim Peters (tim_one)
Summary: 'sendall' missing in 2.1.3 _socket.pyd
Initial Comment:
The prebuilt _socket.pyd module in the Windows binary
distribution of Python 2.1.3 is missing the 'sendall'
method:
>>> import _socket
>>> sock = _socket.socket(_socket.AF_INET,
_socket.SOCK_STREAM)
>>> dir(sock)
['accept', 'bind', 'close', 'connect', 'connect_ex', 'fileno', 'ge
tpeername', 'getsockname', 'getsockopt', 'listen', 'recv', 're
cvfrom', 'send', 'sendto', 'setblocking', 'setsockopt', 'shutd
own']
As the Python 2.1.2 binary for Windows is OK, and
there were no source changes in the module between
2.1.2 and 2.1.3, it appears to have been a build or
packaging problem.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2002-10-30 15:07
Message:
Logged In: YES
user_id=31435
I suppose it could be a search-path problem. You can run
Python with -v (or even -vv) to determine exactly how the
_socket import was resolved. For example,
C:\Python21>python -v
# C:\Python21\lib\site.pyc matches C:\Python21\lib\site.py
import site # precompiled from C:\Python21\lib\site.pyc
# C:\Python21\lib\os.pyc matches C:\Python21\lib\os.py
import os # precompiled from C:\Python21\lib\os.pyc
import nt # builtin
# C:\Python21\lib\ntpath.pyc matches C:\Python21
\lib\ntpath.py
import ntpath # precompiled from C:\Python21\lib\ntpath.pyc
# C:\Python21\lib\stat.pyc matches C:\Python21\lib\stat.py
import stat # precompiled from C:\Python21\lib\stat.pyc
# C:\Python21\lib\UserDict.pyc matches C:\Python21
\lib\UserDict.py
import UserDict # precompiled from C:\Python21
\lib\UserDict.pyc
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.
>>> import _socket
import _socket # dynamically loaded from C:\Python21
\DLLs\_socket.pyd
>>>
In any case, since there's no evidence of a Python bug here,
I'll close this now.
----------------------------------------------------------------------
Comment By: Hamish Lawson (hamishlawson)
Date: 2002-10-30 06:34
Message:
Logged In: YES
user_id=134458
I was indeed using the binary distribution from PythonLabs
rather than one I had built myself. Here's the identification line:
Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)]
on win32
However I installed the binary distribution on another PC and
its _socket module *does* have a 'sendall' method, so it
appears that it may just have been a problem with my
installation - perhaps a relic from other 2.1 installations I've
had.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-10-29 15:37
Message:
Logged In: YES
user_id=31435
Works me. Please show the complete interactive session,
including the Python identification line at the start. Here's
mine:
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.
>>> import _socket
>>> sock = _socket.socket(_socket.AF_INET,
_socket.SOCK_STREAM)
>>> dir(sock)
['accept', 'bind', 'close', 'connect', 'connect_ex', 'fileno',
'getpeername', 'getsockname', 'getsockopt', 'listen',
'recv', 'recvfrom', 'send',
'sendall', ******************************** here ***************
'sendto', 'setblocking', 'setsockopt', 'shutdown']
>>> sock.sendall
<built-in method sendall of socket object at 007BC0D8>
>>>
Or did you build this yourself from source? The 2.1.3 I'm
using was installed from the PLabs Windows installer.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=630670&group_id=5470