我是一个很变态的人吧。。。
为什么会这样?!
#_*_encoding:utf-8_*_
__author__ = 'glcsnz123'
import urllib2, urllib
import wx, thread, threading
import time
import socket
coun = [0] * 100
def Quest(num):
#print "hi"
coun[num] = 1
#socket.setdefaulttimeout(5)
try:
while True:
urllib.urlopen(
"http://www.xs2z.com/Web/Article/ArticleDetail.aspx?guidid=09D1_4B6eke-_0D4-4EE.-90_?-9.F5FCBF?..E")
time.sleep(1)
except Exception, e:
print "die"
finally:
coun[num] = 0
if __name__ == '__main__':
print "begin"
for i in range(0, 100):
thread.start_new_thread(Quest, (i,))
#time.sleep(0.1)
print "end"
s = 0
while True:
if not sum(coun) == s:
print "now:", sum(coun)
s = sum(coun)
time.sleep(3)