Re: Improving the web page download code.

2013-08-28 Thread MRAB
On 28/08/2013 07:23, mukesh tiwari wrote: [snip] Initially I blocked the main using raw_input('') and it was working fine. u = Downloader() signal.signal( signal.SIGINT , u.handleexception) thread.start_new_thread ( u.createurl , () ) for i in xrange ( 5 ) : thread.start_new_thread

Re: Improving the web page download code.

2013-08-28 Thread Alister
On Tue, 27 Aug 2013 12:41:10 -0700, mukesh tiwari wrote: > Hello All, > I am doing web stuff first time in python so I am looking for > suggestions. I wrote this code to download the title of webpages using > as much less resource ( server time, data download) as possible and > should be fast eno

Re: Improving the web page download code.

2013-08-27 Thread mukesh tiwari
On Wednesday, 28 August 2013 04:03:15 UTC+5:30, MRAB wrote: > On 27/08/2013 21:53, mukesh tiwari wrote: > > > On Wednesday, 28 August 2013 01:49:59 UTC+5:30, MRAB wrote: > > >> On 27/08/2013 20:41, mukesh tiwari wrote: > > >> > > [snip] > > >> > if __name__== '__main__': > > >> >

Re: Improving the web page download code.

2013-08-27 Thread MRAB
On 27/08/2013 21:53, mukesh tiwari wrote: On Wednesday, 28 August 2013 01:49:59 UTC+5:30, MRAB wrote: On 27/08/2013 20:41, mukesh tiwari wrote: [snip] >> > if __name__== '__main__': >> > u = Downloader() >> > signal.signal( signal.SIGINT , u.handleexception) >> > thread.start_new_thread

Re: Improving the web page download code.

2013-08-27 Thread mukesh tiwari
On Wednesday, 28 August 2013 01:49:59 UTC+5:30, MRAB wrote: > On 27/08/2013 20:41, mukesh tiwari wrote: > > > Hello All, > > > I am doing web stuff first time in python so I am looking for suggestions. > > I wrote this code to download the title of webpages using as much less > > resource ( se

Re: Improving the web page download code.

2013-08-27 Thread MRAB
On 27/08/2013 20:41, mukesh tiwari wrote: Hello All, I am doing web stuff first time in python so I am looking for suggestions. I wrote this code to download the title of webpages using as much less resource ( server time, data download) as possible and should be fast enough. Initially I used