Re: Urllib2 urlopen and read - difference

2010-04-25 Thread Aahz
In article , J. Cliff Dyer wrote: >On Thu, 2010-04-15 at 11:25 -0700, koranthala wrote: >> >>Suppose I am doing the following: >> req = urllib2.urlopen('http://www.python.org') >> data = req.read() >> >>When is the actual data received? is it done by the first line? or >> is it done only

Re: Urllib2 urlopen and read - difference

2010-04-15 Thread J. Cliff Dyer
On Thu, 2010-04-15 at 11:25 -0700, koranthala wrote: > Hi, >Suppose I am doing the following: > req = urllib2.urlopen('http://www.python.org') > data = req.read() > >When is the actual data received? is it done by the first line? or > is it done only when req.read() is used? > My underst

Re: Urllib2 urlopen and read - difference

2010-04-15 Thread J. Cliff Dyer
On Thu, 2010-04-15 at 11:25 -0700, koranthala wrote: > Hi, >Suppose I am doing the following: > req = urllib2.urlopen('http://www.python.org') > data = req.read() > >When is the actual data received? is it done by the first line? or > is it done only when req.read() is used? > My underst

Urllib2 urlopen and read - difference

2010-04-15 Thread koranthala
Hi, Suppose I am doing the following: req = urllib2.urlopen('http://www.python.org') data = req.read() When is the actual data received? is it done by the first line? or is it done only when req.read() is used? My understanding is that when urlopen is done itself, we would have received al