[PYTHONMAC-SIG] urllib

Thomas Tiemann Thomas.Tiemann@ipk.fhg.de
Wed, 24 Sep 1997 10:45:09 +0200


Hi,

i have a little problem. Is it possible to get with urllib.urlretrieve(url)
an image File. I write the following code on Macintosh:

	import urllib
	:
	url = 'http ://192.0.1.23/tommy/'
	geturl = urllib.urlopen(url)
	:
	furl = findImagePath()
	iurl = url + furl
	# ok,iurl = http ://192.0.1.23/tommy/images/family.gif
	# but
	:
	getfile = urllib.urlretrieve(iurl)

	# the tmp-file is not correct, it can't read form Photoshop or
other programs.

I thnik the file was transfers as text-file and not as binary-file. What is
the answer?

Thomas



_______________
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________