[issue17083] can't specify newline string for readline for binary files

2020-11-27 Thread Alex Shpilkin
Change by Alex Shpilkin : -- nosy: +Alex Shpilkin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue17083] can't specify newline string for readline for binary files

2019-08-25 Thread Géry
Change by Géry : -- nosy: +maggyero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue17083] can't specify newline string for readline for binary files

2014-09-04 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue17083] can't specify newline string for readline for binary files

2014-07-25 Thread Akira Li
Akira Li added the comment: Related issue #1152248: Add support for reading records with arbitrary separators to the standard IO stack It suggests to extend the newline support for both text and binary files. -- nosy: +akira ___ Python tracker

[issue17083] can't specify newline string for readline for binary files

2013-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think readline() is quite clear in its current intent (it reads a line, which conventionally is delimited by '\n'). We mau want to add another method, say read_until_delimiter(), but it's not the same as readline() ;-) I think it would be best for it to be di

[issue17083] can't specify newline string for readline for binary files

2013-02-01 Thread R. David Murray
R. David Murray added the comment: Well, it's a feature by our policy, since it currently works as documented. Probably the first thing would be to get the opinion of someone who works on the IO module, so I've nosied Antoine. Note that this was obviously a conscious design decision, as it is

[issue17083] can't specify newline string for readline for binary files

2013-02-01 Thread Bryant
Bryant added the comment: While my original description of this issue discussed arbitrary strings, I'd like to limit the scope of this issue down to just supporting the newline parameter to builtin.open() for binary files, just as it's supported for regular files. This adds no real new functio

[issue17083] can't specify newline string for readline for binary files

2013-02-01 Thread R. David Murray
R. David Murray added the comment: Anything we do here is a new feature. I have no objection to adding features in this area myself, but I will note that I was shot down for proposing (in another issue) that the newline attribute for text files be allowed to be an arbitrary string. --

[issue17083] can't specify newline string for readline for binary files

2013-02-01 Thread Glenn Linderman
Glenn Linderman added the comment: I think Bryant's request is reasonable, for consistency in functionality. If line oriented operations are allowed on binary files, then a binary newline value should be permitted at the time of open. I think, for handling binary files, that it would also be i

[issue17083] can't specify newline string for readline for binary files

2013-01-30 Thread Bryant
Bryant added the comment: I'm not terribly worried about the "right" way for me to deal with my code, but that Python, in this instance, is inconsistent. While it doesn't want you to apply the concept of a "line" to a binary file in that it prevents you from specifying an EOL string, it does a

[issue17083] can't specify newline string for readline for binary files

2013-01-30 Thread R. David Murray
R. David Murray added the comment: If you are reading in binary mode, then all readline does is get you the next \n terminated chunk of data, which is a convenience in some circumstances. You have to do all the newline handling yourself. Otherwise it isn't a binary read. I think the "right w

[issue17083] can't specify newline string for readline for binary files

2013-01-30 Thread Bryant
New submission from Bryant: When opening binary files in Python 3, the newline parameter cannot be set. While this kind of makes sense, readline() can still be used on binary files. This is great for my usage, but it is doing universal newline mode, I believe, so that any \r, \n, or \r\n trigg