On Jan 15, 9:54 am, "Anjanesh Lekshminarayanan" <m...@anjanesh.net> wrote: > Using Python 3.0 > > So how do I to convert res.read() to ascii on opening the file in > ascii mode f = open('file.txt', 'w')? >
I think this is what you are looking for: res = urllib.request.urlopen(url) f = open('file.txt', 'w') f.write(res.read().decode('ascii')) -- http://mail.python.org/mailman/listinfo/python-list