Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(at': 0.04; 'output': 0.05; 'subject:file': 0.07; 'bytes.': 0.09; 'omit': 0.09; 'subject:into': 0.09; 'windows,': 0.09; 'subject:How': 0.10; 'python': 0.11; '8-bit': 0.16; 'carriage': 0.16; 'cmp': 0.16; 'inversion': 0.16; 'outputs': 0.16; 'preserved': 0.16; 'subject:python': 0.16; 'files.': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'entered': 0.20; '>>>': 0.22; 'python?': 0.22; 'to:name :python-list@python.org': 0.22; 'creating': 0.23; 'received:65.55.116': 0.24; 'guys': 0.24; 'file.': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'skip:- 40': 0.29; '[1]': 0.29; 'mode': 0.30; 'url:mailman': 0.30; 'code': 0.31; '>>>>': 0.31; 'routine': 0.31; 'file': 0.32; 'url:python': 0.33; 'date:': 0.34; 'something': 0.35; 'really': 0.36; '+0100': 0.36; 'done': 0.36; 'url:listinfo': 0.36; 'doing': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.37; 'writes': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'subject:': 0.39; 'to:addr:python.org': 0.39; 'according': 0.40; 'url:mail': 0.40; 'how': 0.40; 'times': 0.62; 're:': 0.63; 'email name:python-list': 0.65; 'url:pdf': 0.68; 'acorn': 0.84; 'carlos': 0.91; 'mistake': 0.91; 'dirty': 0.93; '2013': 0.98 X-TMN: [KWGYmgFkc+KN1Oaxr8izBGf9L8LHoYZl] X-Originating-Email: [carlosnepomuceno@outlook.com] From: Carlos Nepomuceno To: "python-list@python.org" Subject: RE: How to write fast into a file in python? Date: Mon, 20 May 2013 13:34:56 +0300 Importance: Normal In-Reply-To: <5198F377.1050203@mrabarnett.plus.com> References: , ,,<87f9a3d4-427e-472f-bee7-9501ba842b36@googlegroups.com>, ,,<51961B73.2070401@davea.name>, ,,, ,,<51966d15$0$29997$c3e8da3$5496439d@news.astraweb.com>, ,,, , , , , , , <51983BDC.1060203@davea.name>, , <5198F377.1050203@mrabarnett.plus.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 20 May 2013 10:34:56.0650 (UTC) FILETIME=[ABF6B6A0:01CE5545] X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 56 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369046165 news.xs4all.nl 15902 [2001:888:2000:d::a6]:50742 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45616 Oh well! Just got a flashback from the old times at the 8-bit assembly line= .=0A= =0A= Dirty deeds done dirt cheap! lol=0A= =0A= ----------------------------------------=0A= > Date: Sun=2C 19 May 2013 16:44:55 +0100=0A= > From: python@mrabarnett.plus.com=0A= > To: python-list@python.org=0A= > Subject: Re: How to write fast into a file in python?=0A= >=0A= > On 19/05/2013 04:53=2C Carlos Nepomuceno wrote:=0A= >> ----------------------------------------=0A= >>> Date: Sat=2C 18 May 2013 22:41:32 -0400=0A= >>> From: davea@davea.name=0A= >>> To: python-list@python.org=0A= >>> Subject: Re: How to write fast into a file in python?=0A= >>>=0A= >>> On 05/18/2013 01:00 PM=2C Carlos Nepomuceno wrote:=0A= >>>> Python really writes '\n\r' on Windows. Just check the files.=0A= >>>=0A= >>> That's backwards. '\r\n' on Windows=2C IF you omit the b in the mode wh= en=0A= >>> creating the file.=0A= >>=0A= >> Indeed! My mistake just made me find out that Acorn used that inversion = on Acorn MOS.=0A= >>=0A= >> According to this[1] (at page 449) the OSNEWL routine outputs '\n\r'.=0A= >>=0A= >> What the hell those guys were thinking??? :p=0A= >>=0A= > Doing it that way saved a few bytes.=0A= >=0A= > Code was something like this:=0A= >=0A= > FFE3 .OSASCI CMP #&0D=0A= > FFE5 BNE OSWRCH=0A= > FFE7 .OSNEWL LDA #&0A=0A= > FFE9 JSR OSWRCH=0A= > FFEC LDA #&0D=0A= > FFEE .OSWRCH ...=0A= >=0A= > This means that the contents of the accumulator would always be=0A= > preserved by a call to OSASCI.=0A= >=0A= >> "OSNEWL=0A= >> This call issues an LF CR (line feed=2C carriage return) to the currentl= y selected=0A= >> output stream. The routine is entered at &FFE7."=0A= >>=0A= >> [1] http://regregex.bbcmicro.net/BPlusUserGuide-1.07.pdf=0A= >>=0A= >=0A= > --=0A= > http://mail.python.org/mailman/listinfo/python-list =