summaryrefslogtreecommitdiffstats
path: root/Lib/StringIO.py
Commit message (Collapse)AuthorAgeFilesLines
* Add missing docstrings.Raymond Hettinger2004-03-141-0/+67
|
* SF patch #907403: Improvements to cStringIO.writelines()Raymond Hettinger2004-03-081-2/+4
| | | | | | | The writelines() method now accepts any iterable argument and writes the lines one at a time rather than using ''.join(lines) followed by a single write. Results in considerable memory savings and makes the method suitable for use with generator expressions.
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-2/+2
| | | | From SF patch #852334.
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Make the module docstring a raw string, so that the backslash inWalter Dörwald2003-12-151-1/+1
| | | | | "read until end of line ('\n') or EOF" will be treated literally. Fixes SF bug #860155.
* Patch #822994: Consolidate tests for self.closed.Martin v. Löwis2003-10-181-18/+14
|
* Make StringIO its own iterator, similar to real files.Guido van Rossum2003-01-311-1/+9
| | | | (This should also be done to cStringIO.)
* write(): Special case the common situation of a stream that's onlyFred Drake2002-09-171-0/+4
| | | | | being used to dump output (no seeks), so we can avoid a lot of extra checks being made.
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | x in string.whitespace => x.isspace() type(x) in types.StringTypes => isinstance(x, basestring) isinstance(x, types.StringTypes) => isinstance(x, basestring) type(x) is types.StringType => isinstance(x, str) type(x) == types.StringType => isinstance(x, str) string.split(x, ...) => x.split(...) string.join(x, y) => y.join(x) string.zfill(x, ...) => x.zfill(...) string.count(x, ...) => x.count(...) hasattr(types, "UnicodeType") => try: unicode except NameError: type(x) != types.TupleTuple => not isinstance(x, tuple) isinstance(x, types.TupleType) => isinstance(x, tuple) type(x) is types.IntType => isinstance(x, int) Do not mention the string module in the rlcompleter docstring. This partially applies SF patch http://www.python.org/sf/562373 (with basestring instead of string). (It excludes the changes to unittest.py and does not change the os.stat stuff.)
* Whitespace normalization.Tim Peters2002-05-231-6/+6
|
* Added docstrings excerpted from Python Library Reference.Raymond Hettinger2002-05-151-0/+23
| | | | Closes patch 556161.
* Make StringIO work in --disable-unicode builds...Michael W. Hudson2002-05-131-2/+2
|
* Use isinstance() in preference to comparison of type by is.Jeremy Hylton2002-05-101-2/+2
|
* Partial introduction of bools where appropriate.Guido van Rossum2002-04-071-1/+1
|
* SF #515000, print result of f.tell() in test() instead of ignoringNeal Norwitz2002-02-111-1/+1
|
* Restore Python 2.1 StringIO.py behaviour: support concatenatingMarc-André Lemburg2002-01-061-5/+8
| | | | | | Unicode string snippets to larger Unicode strings. This fix should also go into Python 2.2.1.
* StringIO patch #462596: let's [c]StringIO accept read buffers onMarc-André Lemburg2001-09-241-1/+4
| | | | input to .write() too.
* __iter__(): New method so that StringIO's can participate in theBarry Warsaw2001-09-221-0/+3
| | | | iterator protocol.
* Remove silly EMPTYSTRING global. Saves a global lookup.Marc-André Lemburg2001-02-091-8/+6
|
* added __all__ lists to a number of Python modulesSkip Montanaro2001-01-201-0/+2
| | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation.
* Untabify! (Barry, this is gonna cost you a bottle of wine! ;)Fred Drake2000-12-131-105/+105
|
* Change the file's indentation from tabs to 4 spaces per level.Barry Warsaw2000-12-121-151/+163
|
* Accept Finn Bock's patch #102208 to hardcode EINVAL to 22 when errnoBarry Warsaw2000-12-121-13/+16
| | | | | | | | can't be imported. This makes StringIO.py work with Jython. Also, get rid of the string module by converting to string methods. Shorten some lines by using augmented assignment where appropriate.
* [ Bug #116636 ] Bug in StringIO.write()Guido van Rossum2000-10-121-0/+2
| | | | | | | | | | | | http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470 bobalex@rsv.ricoh.com Bug report: If the file position is less than the end of the "file", and a write is performed extending past then end of the file, the data string is corrupted. Solution: in write(), when writing past the end, properly set self.len when newpos is > self.len.
* Add truncate() method to StringIO objects.Fred Drake2000-09-281-0/+13
| | | | This closes SourceForge bug #115527.
* Support sizehint in StringIO.readlines, as documented.Martin v. Löwis2000-09-191-1/+5
|
* Simple changes by Gerrit Holl - move author acknowledgements out ofGuido van Rossum2000-02-281-0/+2
| | | | docstrings into comments.
* Mass patch by Ka-Ping Yee:Guido van Rossum2000-02-021-27/+27
| | | | | | | | | | | 1. Comments at the beginning of the module, before functions, and before classes have been turned into docstrings. 2. Tabs are normalized to four spaces. Also, removed the "remove" function from dircmp.py, which reimplements list.remove() (it must have been very old).
* Raise the right exception (ValueError) for attempted I/O on closed StringIOFred Drake1998-08-181-1/+14
| | | | | objects; this makes the emulation of file objects a bit better, and the exceptions explain things a bit better.
* Patch by Lars Wirzenius to allow f.readline(length).Guido van Rossum1997-07-251-1/+4
|
* Sjoerd's StringIO speed-upGuido van Rossum1996-06-191-7/+30
|
* fix default arg for read() -- should be -1Guido van Rossum1996-01-251-2/+2
|
* Added flush() method.Sjoerd Mullender1995-07-191-0/+2
|
* set softspace to 0 in __init__Guido van Rossum1995-06-221-0/+1
|
* Two new generally useful modules: types defines names for all built-in types,Guido van Rossum1994-06-231-0/+130
StringIO implements pseudo files writing into and reading from strings.