You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I recently had the need for loading gzipped arff files and added the following
code to allow file objects (such as those returned by gzip.open) to be directly
parsed.
Here is the patch for arff/__init__.py:
237,240d236
< # Responsibility for closing fobj is left to the caller
< def load_file_object(fobj):
< for item in Reader(fobj):
< yield item
244c240,242
< load_file_object(fhand)
---
> for item in Reader(fhand):
> yield item
>
Original issue reported on code.google.com by HerrKe...@gmail.com on 7 Dec 2013 at 5:40
The text was updated successfully, but these errors were encountered:
My above patch doesn't work on some versions of python. I therefore recommend
the following patch, which just duplicates a bit of code:
237,240d236
< # Responsibility for closing fobj is left to the caller
< def load_file_object(fobj):
< for item in Reader(fobj):
< yield item
Original comment by HerrKe...@gmail.com on 13 Dec 2013 at 10:00
Original issue reported on code.google.com by
HerrKe...@gmail.com
on 7 Dec 2013 at 5:40The text was updated successfully, but these errors were encountered: