473,320 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1958
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dsclements | last post by:
>Description: I'm running mysql in a 3 server configuration, with 2 servers being slaves to the first. I'm running vpopmail, which means a connection every incoming mail and every check. I woke up...
4
by: faktujaa | last post by:
Hi, I am having some problem with callback used in socket implementation. private static void Connect(string strPrtrIPAddr, int intPrtrPort, ref Socket rsocClient) { try { // Create remote end...
1
by: Adam Hearn | last post by:
Sorry if this difficult to understand but I'm pulling my hair out and could do with some good ideas please... I've developed an application which in .NET as a Windows service which is simply...
13
by: Siemel Naran | last post by:
Hi. I posted this question to comp.lang.c++, but am rephrasing it a bit from what I learned and posting to comp.lang.c++.moderated for more insight. So how do I solve my problem? I want it so...
3
by: Tim Reynolds | last post by:
I support a .Net application running on a SERVER accessing MF Db2 data. Occasionally, we have some type of connection problem that we have been unable to debug up to this point. We typically...
5
by: Hans De Schrijver | last post by:
Where can I find a list of pre-defined exceptions for .NET? Whenever possible, I'd rather use existing exception constants rather than defining my own, unless no suitable one has been predefined. ...
6
by: Harlin Seritt | last post by:
I am running the following code: import socket host = '9.9.45.103' port = 10001 conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect((host, port))
4
by: John Pote | last post by:
Hi all, I want to use python on a server to access incoming TCP port accesses. So I need to use the socket interface which is new to me. To quote the Py Library Reference "7.2 socket --...
6
by: Liming | last post by:
Hi, In a typical 3 tier model (view layer, busines layer and data access layer) where do you handle your exceptions? do you let it buble up all the way to the .aspx pages or do you handle it in...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.