[issue1152248] Enhance file.readlines by making line separator selectable
report at bugs.python.org
Thu Jul 1 12:05:05 CEST 2010
Ralph Corderoy <ralph-pythonbugs at inputplus.co.uk> added the comment:
Google has led me here because I'm trying to see how to process find(1)'s -print0 output with Python. Perl's -0 option and $/ variable makes this trivial.
find -name '*.orig' -print0 | perl -n0e unlink
awk(1) has its RS, record separator, variable too. There's a clear need, and it should also be possible to modify or re-open sys.stdin to change the existing separator.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list