473,396 Members | 1,998 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,396 software developers and data experts.

Python Socket programming

Hi,
I am going to do some socket related programming in Python. Before that, I wish to know the Gotchas of Python Scoket Programming.
Can anyone send me any link that satisfies my needs??
Thanks,
Srini
Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/
Jun 27 '08 #1
2 1023
On Fri, 13 Jun 2008 21:59:06 +0530, srinivasan srinivas wrote:
Hi,
I am going to do some socket related programming in Python. Before that,
I wish to know the Gotchas of Python Scoket Programming. Can anyone send
me any link that satisfies my needs?? Thanks,
Srini
Explore your hobbies and interests. Go to
http://in.promos.yahoo.com/groups/
IMO, there aren't many.

Some methods require a tuple where you might think they shouldn't need
one.

And you have to be careful not to make assumptions about, say, writing n
bytes in your server and reading n bytes in the client - you may not get
all n right away. TCP is free to split or aggregate your chunks as it
sees fit. So you need some sort of record terminator or something,
rather than assuming transfer sizes will be preserved by TCP. Often they
will be preserved, but they aren't guaranteed to be. But this is true of
just about any language with a socket interface.

For the latter issue (the chunk size thing), I put together http://
stromberg.dnsalias.org/~strombrg/bufsock.html

Jun 27 '08 #2
On Fri, 13 Jun 2008 21:59:06 +0530, srinivasan srinivas wrote:
I am going to do some socket related programming in Python. Before that,
I wish to know the Gotchas of Python Scoket Programming.
The only gotcha I see is that you won't want to go back to doing it in C.

--
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 -- pass it on
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Premshree Pillai | last post by:
For the uninitiated: "Socket Programming in Python" at evolt.org: http://evolt.org/article/Socket_Programming_in_Python/17/60276/index.html ===== -Premshree http://www.qiksearch.com/] ...
8
by: gs | last post by:
Hi! This is my first time posting to a newsgroup so please be gentle to me :) Introduction to my problem: I'm studying at the university and a lot of friends and I use MSN to communicate....
2
by: | last post by:
I'm sort of new to both Python and socket programming so I appologize ahead of time if this is a dumb question. I have found that the following code works on windows but on linux I get an exception....
6
by: Maxim Veksler | last post by:
Hello, I wish to do some low level network stuff using python. I've googled somewhat and came up with pylibpcap, trouble is I can't compile it on my Ubuntu 6.10 workstation. Can someone please...
6
by: =?utf-8?q?O=C4=9Fuz_Yar=C4=B1mtepe?= | last post by:
Is it possible to send a data object like a tuple or a list in socket programming? If so how? It seems with socket module it is only possible to send strings. -- Oğuz Yarımtepe...
1
by: inhahe | last post by:
i'm trying to make a .dll that will let me use WSAPoll, which is a windows sockets function, to mimic select.poll on a windows box. i cbb learning python extensions, so i'm just going to use...
1
by: =?iso-8859-1?q?C=E9dric_Lucantis?= | last post by:
Hi, Le Friday 13 June 2008 18:29:06 srinivasan srinivas, vous avez écrit : Yes, the friendly manual :) http://docs.python.org/lib/module-socket.html and if you want to know more about...
5
by: fishfin | last post by:
I was working through a tutorial about how to write a server using python (the url is bellow). I am sure that the server is working to some degree because when the server is running localhost:8080...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.