#!/usr/bin/python import urllib url = 'http://img.yahoo.co.jp/images/main7.gif' file = urllib.urlopen(url).read() try : f=open('test.gif', "wb") f.write(file); f.close except : print "file error."