def download(url):
	"""Copy the contents of a file from a given URL
	to a local file.
	"""
	import urllib
	webFile = urllib.urlopen(url)
	localFile = open(url.split('/')[-1], 'w')
	localFile.write(webFile.read())
	webFile.close()
	localFile.close()
Copy the contents of a file from a given URL
	to a local file.
	
recipes/Python/496685_Downloading_a_File_from_the_Web/recipe-496685.py