summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/text_file.py
Commit message (Collapse)AuthorAgeFilesLines
* Changed so lines that are all comment (or just whitespace + comment)Greg Ward2000-09-161-9/+27
| | | | | | | | | | are completely skipped, rather than being treated as blank lines (and then subject to the 'skip_blanks' flag). This allows us to process old-style Setup files, which rely on hello \\ # boo! there coming out as "hello there".
* Andrew Kuchling:Greg Ward2000-09-161-1/+1
| | | | | Fixed precendence bug that meant setting skip_blanks to false didn't work under some circumstances.
* [change from 2000/08/11, propagating now to distutils copy]Greg Ward2000-09-161-9/+17
| | | | | Factored the guts of 'warn()' out to 'gen_error()', and added the 'error()' method (trivial thanks to the refactoring).
* [change from 2000/04/17, propagating now to distutils copy]Greg Ward2000-09-161-26/+30
| | | | | | | Dropped the 'collapse_ws' option and replaced it with 'collapse_join' -- it's *much* faster (no 're.sub()') and this is the reason I really added 'collapse_ws', ie. to remove leading whitespace from a line being joined to the previous line.
* Added all documentation.Greg Ward1999-09-291-13/+106
| | | | | Slightly improved the code for dealing with newline on a comment line, and for stripping whitespace.
* Allow comment characters (#) to be escaped:Greg Ward1999-08-101-14/+37
| | | | | | | - did away with 'comment_re' option -- it's just not that simple anymore - heavily revised the main logic in 'readline()' to accomodate this Beefed up 'warn()': 'line' can be list or tuple, and 'msg' is automatically converted to a string.
* 'warn()' method now takes an optional line number.Greg Ward1999-04-151-4/+6
|
* Replaced the last attempt at an "unreadline" with one that actuallyGreg Ward1999-03-291-29/+18
| | | | works on non-seekable file-like objects, such as URLs. (Oops.)
* Added 'linestart' array and 'unreadline()' method (makes parsing a lot easier).Greg Ward1999-03-261-1/+30
|
* Changes to allow passing an open file to the constructor (to supportGreg Ward1999-03-231-14/+13
| | | | | ProcessHierarchy's changes to support reading from a remote URL in ProcessDatabase).
* Added collapse_ws option.Greg Ward1999-03-081-0/+5
|
* Added 'warn' method.Greg Ward1999-01-181-1/+10
|
* Added: mems.lib.text_file: provides TextFile class for parsing textGreg Ward1999-01-131-0/+206
files with (optional) comment stripping, blank line skipping, whitespace removal, and line joining with trailing backslashes.