How to write fast into a file in python?

Carlos Nepomuceno carlosnepomuceno at outlook.com
Sat May 18 23:53:02 EDT 2013


----------------------------------------
> Date: Sat, 18 May 2013 22:41:32 -0400
> From: davea at davea.name
> To: python-list at python.org
> Subject: Re: How to write fast into a file in python?
>
> On 05/18/2013 01:00 PM, Carlos Nepomuceno wrote:
>> Python really writes '\n\r' on Windows. Just check the files.
>
> That's backwards. '\r\n' on Windows, IF you omit the b in the mode when
> creating the file.

Indeed! My mistake just made me find out that Acorn used that inversion on Acorn MOS.

According to this[1] (at page 449) the OSNEWL routine outputs '\n\r'.

What the hell those guys were thinking??? :p

"OSNEWL
This call issues an LF CR (line feed, carriage return) to the currently selected
output stream. The routine is entered at &FFE7."

[1] http://regregex.bbcmicro.net/BPlusUserGuide-1.07.pdf 		 	   		  


More information about the Python-list mailing list