STINNER Victor [EMAIL PROTECTED] added the comment:
So can we close this?
Yes: retrbinary() and storbinary() can be used to get/send bytes.
Reopen the issue (or open another one) if we miss another problem.
--
status: open - closed
___
Python
STINNER Victor [EMAIL PROTECTED] added the comment:
Function result type should be the same of the connection is in text
mode or binary mode. As far as I remember, the text mode converts the
newline byte sequence, not the charset. A text file could be stored as
latin-1, utf-8, koi-8 or
STINNER Victor [EMAIL PROTECTED] added the comment:
- retrbinary() and storbinary() uses bytes (byte strings)
- retrlines() and storlines() uses str (unicode strings) with
charset=self.encoding
- command is an unicode string converted to byte string with
charset=self.encoding
So it's
Benjamin Peterson [EMAIL PROTECTED] added the comment:
So can we close this?
--
nosy: +benjamin.peterson
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1248
___
Giampaolo Rodola' [EMAIL PROTECTED] added the comment:
Actually the 'r' flag is used against the control connection which is
not supposed to receive any binary data and in FTP.retrlines method
which is supposed to retrieve data in line mode.
___
Python
Changes by Giampaolo Rodola' [EMAIL PROTECTED]:
--
nosy: +giampaolo.rodola
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1248
__
___
Python-bugs-list mailing list
New submission from Brett Cannon:
For instance, ftplib.FTP reads from sockets using socket.makefile(), but
in text mode. That's bad when the data could be in the format of ASCII
or binary data.
--
components: Library (Lib)
keywords: py3k
messages: 56281
nosy: brett.cannon
priority: