- 13 Apr, 2007 6 commits
-
-
Guido van Rossum authored
-
Guido van Rossum authored
Don't read more than one line when reading text from a tty device. Add peek() and read1() methods. Return str instead of unicode when return ASCII characters in text mode.
-
Guido van Rossum authored
-
Guido van Rossum authored
Support ord(b) where b is a 1-byte string. In zipfile.py, work around bytes being ints instead of chars, sometimes.
-
Guido van Rossum authored
-
Guido van Rossum authored
buffer-supporting objects (Unicode always excluded), and also of str and bytes. (For some reason u"" + b"" doesn't fail, I'll investigate later.)
-
- 12 Apr, 2007 6 commits
-
-
Guido van Rossum authored
Fix the truncate() semantics -- it should not affect the current position. Switch wave.py/chunk.py to struct.unpack_from() to support bytes. Don't use writelines() on binary files (test_fileinput.py).
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
not the number of array elements.
-
Guido van Rossum authored
- 25% speed increse in tell(); - f.seek(0, 1) now maps to f.seek(f.tell(), 0) instead of to f.tell().
-
- 11 Apr, 2007 8 commits
-
-
Georg Brandl authored
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
call self.buffer.tell().
-
Guido van Rossum authored
Restore complex pickling. Use cPickle in io.py.
-
Guido van Rossum authored
without touching io.py or test_io.py. The cause of the failure was that bytes objects didn't pickle right. As a stop-gap measure, I'm providing bytes pickling via copy_reg. Eventually, we should use a more efficient protocol, e.g. __reduce_ex__ or __getstate__/__setstate__.
-
Guido van Rossum authored
There is somewhat working (but slow) code supporting seek/tell for text files, but extensive testing exposes a bug I can't nail down.
-
- 10 Apr, 2007 5 commits
-
-
Guido van Rossum authored
write() returns the number of bytes/characters written/buffered. FileIO.close() calls self.flush(). Implement readinto() for buffered readers. Tests th check all these. Test proper behavior of __enter__/__exit__.
-
Guido van Rossum authored
Reduce large file size to 2**31 (and a bit).
-
Guido van Rossum authored
Etc., etc.
-
Guido van Rossum authored
-
Guido van Rossum authored
Removed unused _PyFileIO class. Changed inheritance structure. TODO: do the same kinds of things to TextIO.
-
- 09 Apr, 2007 4 commits
-
-
Guido van Rossum authored
Add tests for str <cmpop> bytes.
-
Guido van Rossum authored
bytes objects can now be compared to anything that supports the buffer API.
-
Guido van Rossum authored
-
Guido van Rossum authored
(The new I/O library revealed the problem.)
-
- 08 Apr, 2007 2 commits
-
-
Guido van Rossum authored
Add closed attribute. Support int argument to open() -- wrapping a file descriptor. For b/w compat, support readline(n). Support readlines() and readlines(n). Flush on __del__. Added some XXX comments.
-
Guido van Rossum authored
instead of a filename. Add a 'closed' attribute.
-
- 07 Apr, 2007 3 commits
-
-
Guido van Rossum authored
"import exceptions" to behave bizarrely.
-
Guido van Rossum authored
(Should be backported to 2.6, really.)
-
Guido van Rossum authored
This now appears to work when io.open is substituted for the real open in fileinput.py -- at least the latter's unit tests pass.
-
- 06 Apr, 2007 3 commits
-
-
Guido van Rossum authored
Some cleanup of test_io.py and io.py. Added seeking to buffered reader and writer, but no tests yet.
-
Guido van Rossum authored
-
Guido van Rossum authored
This is essentially a checkpoint.
-
- 29 Mar, 2007 2 commits
-
-
Fred Drake authored
mystery italics
-
Guido van Rossum authored
-
- 28 Mar, 2007 1 commit
-
-
Collin Winter authored
Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.
-