how to measure TCP congestion windows using python ??

2010-12-19 Thread plz
hi! i'm newbie about python and i want to measure the value of cwnd in TCP socket. I have searched from an internet and got that we could handle it from SOL_TCP, TCP_INFO...since unix had #include and we could refer to tcp_info for getting the information of TCP by using this method but i do

Re: how to measure TCP congestion windows using python ??

2010-12-19 Thread plz
hi many thanks for helping me i also tried to manipulate it last night here is my code... import socket import struct sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) tcp_info = sock.getsockopt(socket.SOL_TCP, socket.TCP_INFO, struct.calcsize('BBB')) print str

Download parts not whole file in ones

2007-02-13 Thread NOSPAM plz
Hey, My problem is, is it possible to download parts of a file while. i think is it is called threading My code thats download the whole webpage, and stunds the app while is is downloading: ---CODE--- import urllib # the heavy file to download f = urllib.urlopen("http://da.wiki

Regex highlight html

2007-02-13 Thread NOSPAM plz
Hey, I want to write a function that highlights html code. I have read the wiki page http://en.wikipedia.org/wiki/Regular_expressions just like this: test to this: test Just example colors - not so pretty :) Any suggestions? Andreas -- http://mail.python.org/mailman/listinfo/python-l

Re: Regex highlight html

2007-02-13 Thread NOSPAM plz
Hey, I want to write a function that highlights html code. I have read the wiki page http://en.wikipedia.org/wiki/Regular_expressions just like this: test to this: ="test.png" alt="test pic" height="100" width="100"> ="#">test Just example colors - not so pretty :) Any suggestions? An

Re: Mulig SPAM: float print formatting

2007-02-13 Thread NOSPAM plz
hg skrev: > Hi, > > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 > > Any clue ? > > Thanks, > > hg > > Try this: a = 45.45 # the floating number print "some text", print a, print "some text again" or just this: print "some text", prin

Re: Regex highlight html

2007-02-13 Thread NOSPAM plz
Gabriel Genellina skrev: > En Tue, 13 Feb 2007 10:13:26 -0300, NOSPAM plz <[EMAIL PROTECTED]> > escribió: > > >> I want to write a function that highlights html code. >> > > Well, it's already done, you have Pygments http://