New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readline() method #13
Comments
I agree. Can you implement it? |
I'll give it a shot. |
@coreyatmoat what's your progress? |
Sadly no. A while back a co-worker wrote https://gist.github.com/coreyatmoat/c961f99dfb0cfabdda54 as a sort of work around, but I haven't had time to figure out how it'd fit into your framework. |
+1 |
I'm having a look at this now, since one of my projects needs this to work too :) Is there any reason why we need to maintain independent pointers for |
Thanks @mpenkov . The reason for the "independent pointer" was related to difficulties with buffering IIRC, but was only technical (CC @ziky90 ). That behaviour is not a part of the API contract (I don't think it's even documented). If we can make a single pointer work, that's fine, even preferable. |
@piskvorky OK. I think I've got it working. Have a look here: https://github.com/mpenkov/smart_open/commit/aca3a18358afb5f42b5f7e5c1355e8ff93a9bcea I made a separate branch ( What do you think is the cleanest way of getting this into your repo? The simplest I can think of:
Another way is:
Let me know if there's a simpler or more convenient way. |
Great stuff! @tmylk please review. Re. branches: it's your call. If splitting the changes into two separate PRs is too complicated, doing both in one branch is fine with me. We appreciate your work, this is some much needed functionality. |
@piskvorky @tmylk I've authored a request to pull from my |
- Bundle gzipstream to enable streaming of gzipped content from S3 - Update gzipstream to avoid deep recursion - Implement readline for S3 - Add pip requirements.txt
@piskvorky @tmylk I think we can close this now. 78c461e resolved this. |
This would be useful for extracting the header from a csv.
The text was updated successfully, but these errors were encountered: