|| at Jan 13, 2009 at 3:58 pm
On Jan 13, 10:35?am, Steve Holden wrote:
? I am sending data using the socket interface in python, but I want
to know how big the ethernet packet size is (in bytes). ?I didn't
really see a way using the socket library of how to do this. ?Any
There is no way to know what size Ethernet packets will result from
specific traffic. Or do you want to know the MTU size (largest possible
Ethernet packet size)? This shouldn't really matter, since large TCP
messages will be split into a sequence of IP datagrams, and large IP
datagrams will be automatically fragmented and then reassembled at the
Is there a specific reason this is important to you?
Steve Holden ? ? ? ?+1 571 484 6266 ? +1 800 494 3119
Holden Web LLC ? ? ? ? ? ? ?http://www.holdenweb.com/
I am trying to determine the actual network link speed.
From http Tue Jan 13 17:01:25 2009
From: http (Paul Rubin)
Date: 13 Jan 2009 08:01:25 -0800
Subject: Ternary operator and tuple unpacking -- What am I missing ?
imageguy <imageguy1206 at gmail.com> writes:
Using py2.5.4 and entering the following lines in IDLE, I don't really
understand why I get the result shown in line 8.
Note the difference between lines 7 and 10 is that 'else' clause
result enclosed in brackets, however, in line 2, both the 'c,d'
variables are assign correctly without the brackets being required.
c,d = n if n is not None else 0,0
c,d = (n if n is not None else 0), 0
In the case where n is None, c and d are both set to 0.
In the case where n is a tuple, c is set to the tuple and d is set to 0.
Does that help?