summaryrefslogtreecommitdiffstats
path: root/Lib/fileinput.py
Commit message (Collapse)AuthorAgeFilesLines
* Implement iterator protocol.Neil Schemenauer2002-03-261-4/+13
|
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-1/+1
|
* more __all__ updatesSkip Montanaro2001-01-201-0/+3
|
* Speed it up by using readlines(sizehint). It's still slower thanGuido van Rossum2001-01-051-10/+39
| | | | | | | other ways of reading input. :-( In the process, I added an optional bufsize argument to the input() function and the FileInput class.
* Implement suggestion from Lawrence Kesteloot in PR#280, to change theGuido van Rossum2000-04-101-6/+7
| | | | | | | | | | | | | | | default list of files from () to None, and explicitly test for None before defaulting to sys.argv[1:]. This means that if you pass in an explicit empty list, it will read stdin instead of defaulting to sys.argv[1:]. This fixes a buglet in the test script (when called with options but without files, it chokes when it tries to interpret the options as files). Lawrence adds: "I suspect that this is a safe change, because I can't imagine someone actively passing in an empty list when they want sys.argv used." I agree.
* Fix for PR#111: when using the inplace option, give the new file theGuido van Rossum1999-10-181-3/+15
| | | | | same permissions as the old file, plugging a security hole. (Not using exactly the suggested bugfix.)
* Add missing initializer for self._backupfilename. Due to Ralph Butler.Guido van Rossum1998-07-201-0/+1
|
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-100/+100
|
* A new standard module, as discussed on comp.lang.python, to simplifyGuido van Rossum1997-11-211-0/+254
the writing of filters. Typical use is: import fileinput for line in fileinput.input(): process(line) This iterates over the lines of all files listed in sys.argv[1:], defaulting to sys.stdin if the list is empty or when a filename is '-'. There is also an option to use this to direct the output back to the input files.