Skip to content

Instantly share code, notes, and snippets.

@superbobry
Created May 17, 2014 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superbobry/ca00f2002fe4cc6cdfb5 to your computer and use it in GitHub Desktop.
Save superbobry/ca00f2002fe4cc6cdfb5 to your computer and use it in GitHub Desktop.
'io' module in Python2.6.6
>>> import io
>>> f = io.open("./article_categories_en.nt")
>>> f = io.TextIOWrapper(f)
>>> next(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/io.py", line 1782, in next
line = self.readline()
File "/usr/lib64/python2.6/io.py", line 1858, in readline
while self._read_chunk():
File "/usr/lib64/python2.6/io.py", line 1590, in _read_chunk
input_chunk = self.buffer.read1(self._CHUNK_SIZE)
AttributeError: 'TextIOWrapper' object has no attribute 'read1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment