Dennis Lee Bieber wrote: > On Thu, 06 Mar 2008 22:35:18 -0500, Sam <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python:
> ['line 1', 'line 2', 'embedded', 'line', 'something'] >>>> sample="""line 1\rline 2\rembedded\nline\rsomething\r""" >>>> sample.splitlines() > ['line 1', 'line 2', 'embedded', 'line', 'something'] >>>> > You are right partly right. That code only parsed the HTML request header which I believe had one specific line termination as prescribed by RFC ( but I will have too look it up later since I don't remember whichfor sure. ) Once again got confused on them buggers, "\n" is LINUX ( the least logical). > splitlines() handles \r\n, \n, and \r as line endings -- and no stray > empty ending! (however, \n\r /does/ create an empty element) > !!~! SPLITLINES() BEAUTY, Thanks for reminding me. I mush have a faulty memory cell or entire row. -- http://mail.python.org/mailman/listinfo/python-list