Re: urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread mattia
Il Tue, 17 Mar 2009 15:40:02 +, R. David Murray ha scritto: > mattia wrote: >> Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto: >> >> > mattia wrote: >> >> Hi all, can you tell me why the module urllib.request (py3) add >> >> extra characters (b'fef\r\n and \r\n0\r\n\r\n') in

Re: urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread R. David Murray
mattia wrote: > Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto: > > > mattia wrote: > >> Hi all, can you tell me why the module urllib.request (py3) add extra > >> characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the > >> following and urllib2 (py2.6) correctly

Re: urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread mattia
Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto: > mattia wrote: >> Hi all, can you tell me why the module urllib.request (py3) add extra >> characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the >> following and urllib2 (py2.6) correctly not? >> >> py2.6 >> >>> im

Re: urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread mattia
Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto: > mattia wrote: >> Hi all, can you tell me why the module urllib.request (py3) add extra >> characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the >> following and urllib2 (py2.6) correctly not? >> >> py2.6 >> >>> im

urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread R. David Murray
mattia wrote: > Hi all, can you tell me why the module urllib.request (py3) add extra > characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the > following and urllib2 (py2.6) correctly not? > > py2.6 > >>> import urllib2 > >>> f = urllib2.urlopen("http://www.google.com";).read()

urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread mattia
Hi all, can you tell me why the module urllib.request (py3) add extra characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the following and urllib2 (py2.6) correctly not? py2.6 >>> import urllib2 >>> f = urllib2.urlopen("http://www.google.com";).read() >>> fd = open("google26.html