In article <7bee5155-f1a1-44aa-90f6-eaabb3617...@v6g2000prd.googlegroups.com>,
harryos wrote:
>
>class DataGrabber(threading.Thread):
>def __init__(self,url):
>threading.Thread.__init__(self)
>self.url=url
>def run(self):
>data=self.get_page_data()
>process
On Fri, 2010-10-08, harryos wrote:
> hi
> I am trying to write a DataGrabber which reads some data from given
> url..I made DataGrabber as a Thread and want to wait for some interval
> of time in case there is a network failure that prevents read().
> I am not very sure how to implement this
>
> c
In message , Diez B. Roggisch wrote:
> for n in xrange(max_number_of_retries):
> try:
> f=urllib.urlopen(self.url)
> data = f.read()
> break # exist the loop if all
> except IOError:
> pass
Is it worth delaying before retrying? In case of a transient routin
harryos writes:
> hi
> I am trying to write a DataGrabber which reads some data from given
> url..I made DataGrabber as a Thread and want to wait for some interval
> of time in case there is a network failure that prevents read().
> I am not very sure how to implement this
>
> class DataGrabber(
hi
I am trying to write a DataGrabber which reads some data from given
url..I made DataGrabber as a Thread and want to wait for some interval
of time in case there is a network failure that prevents read().
I am not very sure how to implement this
class DataGrabber(threading.Thread):
def __in