python dowload

Aahz aahz at
Sun Feb 28 01:47:30 CET 2010

In article <2fWdnXOfjat-whnWnZ2dnUVZ_rGdnZ2d at>,
monkeys paw  <monkey at> wrote:
>On 2/23/2010 3:17 PM, Tim Chase wrote:
>> Sure you don't need this to be 'wb' instead of 'w'?
>'wb' does the trick. Thanks all!
>import urllib2
>a = open('adobe.pdf', 'wb')
>i = 0
>for line in 
>     i = i + 1
>     a.write(line)

Using a for loop here is still a BAD IDEA -- line could easily end up
megabytes in size (though that is statistically unlikely).
Aahz (aahz at           <*>

"Many customs in this life persist because they ease friction and promote
productivity as a result of universal agreement, and whether they are
precisely the optimal choices is much less important." --Henry Spencer

More information about the Python-list mailing list