471,049 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

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

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.

Oct 7 '05 #1
1 1870
mi************@yahoo.com wrote:
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
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Oct 7 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by faktujaa | last post: by
13 posts views Thread by Siemel Naran | last post: by
5 posts views Thread by Hans De Schrijver | last post: by
6 posts views Thread by Harlin Seritt | last post: by
4 posts views Thread by John Pote | last post: by
6 posts views Thread by Liming | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.