On Fri, May 11, 2012 at 1:32 PM, Jason <ja...@deadtreepages.com> wrote:
> Is there any way to specify the end of line character to use in 
> file.readline() ?
>
> I would like to use '\r\n' as the end of line and allow either \r or \n by 
> itself within the line.

In Python 3 you can pass the argument newline='\r\n' to the open
function when you open the file.  I don't know of anything comparable
in Python 2.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to