In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I am trying to scan the lines in the string text: > lines = text.split('\n') > > seemed to do the job but has the side effect of stripping the > whitespace. As I am reading Python source in this text and checking > identation this is a bit annoying :-) > > How can I stop this happening? Doesn't look like an option from the > documents. Do I have to use a regexp (scary unchartered stuff for > me...)? >>> "a\nb\nc\n".splitlines(True) ['a\n', 'b\n', 'c\n'] Just -- http://mail.python.org/mailman/listinfo/python-list