Downloading images with python

Fredrik Lundh fredrik at
Fri Oct 20 03:46:47 EDT 2006

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 you were trying to access the file while your script was still running.


More information about the Python-list mailing list