New submission from Mark Summerfield <[EMAIL PROTECTED]>: Py30rc1
On Windows the file object returned by urllib.request.urlopen() appears to be in binary mode, so .read() returns a bytes object. But on Linux it appears to be in text mode, so .read() returns a str object. It seeems to me that the same type of file object should be returned on all platforms, otherwise you have to test the platform and use str.encode() or bytes.decode() depending on where the code is running. ---------- components: Library (Lib) messages: 73565 nosy: mark severity: normal status: open title: urllib.request.urlopen() different on Windows than Linux type: behavior versions: Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3930> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com