[PYTHONMAC-SIG] urllib
Jack Jansen
Jack.Jansen@cwi.nl
Wed, 24 Sep 1997 13:20:22 +0200
> Hi,
>
> i have a little problem. Is it possible to get with urllib.urlretrieve(url)
> an image File.
The file is fetched and saved in text-mode in stead of binary mode. Edit
urllib.py, look for all makefile() and open() calls and give them flag 'rb' or
'wb'.
This isn't completely correct either, since text files arrive on your mac with
the end-of-line convention of the remote system, but there's little to be done
about it. At least your binary files will be ok.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm
_______________
PYTHONMAC-SIG - SIG on Python for the Apple Macintosh
send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________