where to find information about errors/exceptions in socket.py

M

mirandacascade

Version of python: 2.4
O/S: Win2K

I will be writing some python scripts to do some client-side
programming that involves socket.py. I expect that I will be making
calls to the following methods/functions:

connect_ex()
setsockopt()
sendall()
recv()
close()

Where can one find information about whether the functions/methods
above return error codes that provide some indication as to whether the
function/method succeeded? Is there an exception class for handling
exceptions raised in socket.py? If so, where can one find information
about it?

I consulted the docstrings and didn't find much about return codes or
exception classes. Also looked at the Lutz "Programming Python"
text...it devotes several pages to socket programming, but I didn't
observe much with regard to error/exception handling.
 
S

Steve Holden

Version of python: 2.4
O/S: Win2K

I will be writing some python scripts to do some client-side
programming that involves socket.py. I expect that I will be making
calls to the following methods/functions:

connect_ex()
setsockopt()
sendall()
recv()
close()

Where can one find information about whether the functions/methods
above return error codes that provide some indication as to whether the
function/method succeeded? Is there an exception class for handling
exceptions raised in socket.py? If so, where can one find information
about it?

I consulted the docstrings and didn't find much about return codes or
exception classes. Also looked at the Lutz "Programming Python"
text...it devotes several pages to socket programming, but I didn't
observe much with regard to error/exception handling.
I'd suggest reading the documentation myself:

http://docs.python.org/lib/module-socket.html

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top