import os
import sys, urllib2, urllib
import re
import time
from threading import Thread
class testit(Thread):
def __init__ (self):
Thread.__init__(self)
def run(self):
url = 'http://games.espnstar.asia/the-greatest-odi/post_brackets.php'
data = urllib.urlencode([('id',"btn_13_9_13"), ('matchNo',"13")])
req = urllib2.Request(url)
fd = urllib2.urlopen(req, data)
<TAB>fd.close()
<TAB>"""while 1:
data = fd.read(1024)
if not len(data):
break
sys.stdout.write(data)"""
url2 = 'http://games.espnstar.asia/the-greatest-odi/post_perc.php'
data2 = urllib.urlencode([('id',"btn_13_9_13"), ('matchNo',"13")])
req2 = urllib2.Request(url2)
fd2 = urllib2.urlopen(req2, data2)
<TAB>#prints current votes
while 1:
data2 = fd2.read(1024)
if not len(data2):
break
sys.stdout.write(data2)
<TAB>fd2.close()
print time.ctime()
print " ending thread\n"
i=-1
while i<0:
current = testit()
time.sleep(0.001) #decrease this like 0.0001 for more loops
current.start()
Hey can anybody help me finding out the error in the code Its saying inconsistent use of tabs an spaces in indentation