Re: Downloading images with python

2006-10-20 Thread Fredrik Lundh
Hans Olav Hygen wrote: > myfile = open("P:\Jobb\Prosjekt\Maanedsoversikt\myfile.jpg", "wb") > myfile.write(s) > myfile.close make that "myfile.close()" > But the images get cropped at the bottom. files are closed when the program exits (unless it does so in an uncontrolled way), so I assume yo

Downloading images with python

2006-10-20 Thread Hans Olav Hygen
On 23. of October last year a the follwing was posted to this group: > htmlSource=urllib.urlopen("http://www.godandscience.org/images/nebula.jpg";) > # Read from the object, storing the page's contents in 's'. > s = htmlSource.read() > htmlSource.close() > myfile = open("myfile.jpg", "w") > myfile