Message180988
| Author |
r.david.murray |
| Recipients |
r.david.murray, susurrus |
| Date |
2013年01月30日.19:18:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1359573538.17.0.175591200821.issue17083@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 way" to do what you want is to write a custom subclass of one of the IO classes. Should such a subclass be added to Python? That's an interesting question. A first step toward an answer might be to post it as a recipe on the ActiveState site and see how many people find it useful. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年01月30日 19:18:58 | r.david.murray | set | recipients:
+ r.david.murray, susurrus |
| 2013年01月30日 19:18:58 | r.david.murray | set | messageid: <1359573538.17.0.175591200821.issue17083@psf.upfronthosting.co.za> |
| 2013年01月30日 19:18:58 | r.david.murray | link | issue17083 messages |
| 2013年01月30日 19:18:57 | r.david.murray | create |
|