First of all, let me say thank you to all of you. I have asked many
questions (some of them are dump questions), and you have kindly
helped me. I am not going to reply every message to say thank-you
since that would be annoying for such group with such high daily
traffics. Thank you very much.
I decided to go with one big log file, which will be shared by all
threads (child and parent). A log message Queue is used to store all
log entries, and a customized logger thread will get log entries from
the Queue.
#from the logger thread#
def run(self):
while self.flag == 1: #if
I am trying to measure some system response time by using the time.time
() or time.clock() in my script. However, the numbers I get are in
10s of milliseconds.
For example,
1248481670.34 #from time.time()
0.08 #from time.clock()
That won't work for me, since the response time
I have prepared my headers and data for a HTTP POST message; however,
I am not sure how to pass the data to the opener. Can you guys
provide some suggestions? Thanks.
proxy_handler = urllib2.ProxyHandler({'http': 'http://my.proxy.com:
3128/'})
opener = urllib2.build_opener(proxy_handler)
url
On Jul 22, 1:54 pm, Diez B. Roggisch de...@nospam.web.de wrote:
You can use proxy-tools such as tcpmon or sniff traffic using wireshark.
Diez
Thanks,
but I am trying to enable some debug mode to log all outgoing and
incoming messages for certain period of time, and running another
proxy-tool
For example, I have a string #a=valuea;b=valueb;c=valuec;, and I
will like to take out the values (valuea, valueb, and valuec). How do
I do that in Python? The group method will only return the matched
part. Thanks.
p = re.compile('#a=*;b=*;c=*;')
m = p.match(line)
if m:
I am trying to implement a simple client that can do the following:
1)to send the following kinds of HTTP requests and validate responses
1.1 GET
1.2 POST with application/x-www-form-urlencoded encoding
1.3 POST with multipart/form-data encoding
2)to set any number of (even duplicate) headers.