Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45616

RE: How to write fast into a file in python?

From Carlos Nepomuceno <carlosnepomuceno@outlook.com>
Subject RE: How to write fast into a file in python?
Date 2013-05-20 13:34 +0300
References <5198F377.1050203@mrabarnett.plus.com>
Newsgroups comp.lang.python
Message-ID <mailman.1885.1369046165.3114.python-list@python.org> (permalink)

Show all headers | View raw


Oh well! Just got a flashback from the old times at the 8-bit assembly line.

Dirty deeds done dirt cheap! lol

----------------------------------------
> Date: Sun, 19 May 2013 16:44:55 +0100
> From: python@mrabarnett.plus.com
> To: python-list@python.org
> Subject: Re: How to write fast into a file in python?
>
> On 19/05/2013 04:53, Carlos Nepomuceno wrote:
>> ----------------------------------------
>>> Date: Sat, 18 May 2013 22:41:32 -0400
>>> From: davea@davea.name
>>> To: python-list@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
>>
> Doing it that way saved a few bytes.
>
> Code was something like this:
>
> FFE3 .OSASCI CMP #&0D
> FFE5 BNE OSWRCH
> FFE7 .OSNEWL LDA #&0A
> FFE9 JSR OSWRCH
> FFEC LDA #&0D
> FFEE .OSWRCH ...
>
> This means that the contents of the accumulator would always be
> preserved by a call to OSASCI.
>
>> "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
>>
>
> --
> http://mail.python.org/mailman/listinfo/python-list 		 	   		  

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to write fast into a file in python? lokeshkoppaka@gmail.com - 2013-05-16 20:20 -0700
  Re: How to write fast into a file in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-17 03:51 +0000
  Re: How to write fast into a file in python? lokeshkoppaka@gmail.com - 2013-05-16 21:35 -0700
    Re: How to write fast into a file in python? Dave Angel <davea@davea.name> - 2013-05-17 07:58 -0400
    RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-17 18:20 +0300
      Re: How to write fast into a file in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-17 16:42 +0000
        RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-17 20:25 +0300
      Re: How to write fast into a file in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-17 17:47 +0000
        RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-17 21:18 +0300
          Re: How to write fast into a file in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-18 04:01 +0000
            Re: How to write fast into a file in python? Chris Angelico <rosuav@gmail.com> - 2013-05-18 15:28 +1000
            Re: How to write fast into a file in python? 88888 Dihedral <dihedral88888@googlemail.com> - 2013-05-18 04:09 -0700
        RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-17 21:33 +0300
        RE: How to write fast into a file in python? Fábio Santos <fabiosantosart@gmail.com> - 2013-05-18 08:49 +0100
        Re: How to write fast into a file in python? Chris Angelico <rosuav@gmail.com> - 2013-05-19 00:29 +1000
        RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-18 20:00 +0300
          Re: How to write fast into a file in python? Tim Roberts <timr@probo.com> - 2013-05-19 19:04 -0700
        Re: How to write fast into a file in python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-18 15:14 -0400
          Re: How to write fast into a file in python? Roy Smith <roy@panix.com> - 2013-05-18 15:37 -0400
          Re: How to write fast into a file in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-18 22:23 +0000
        Re: How to write fast into a file in python? Fábio Santos <fabiosantosart@gmail.com> - 2013-05-18 22:19 +0100
        Re: How to write fast into a file in python? Dave Angel <davea@davea.name> - 2013-05-18 22:41 -0400
        RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-19 06:53 +0300
        Re: How to write fast into a file in python? MRAB <python@mrabarnett.plus.com> - 2013-05-19 16:44 +0100
        RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-20 13:34 +0300
    Re: How to write fast into a file in python? Dan Stromberg <drsalists@gmail.com> - 2013-05-18 12:38 -0700
    RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-19 08:31 +0300
    RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-19 08:42 +0300
    Re: How to write fast into a file in python? Chris Angelico <rosuav@gmail.com> - 2013-05-19 19:21 +1000
    RE: How to write fast into a file in python? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-19 12:41 +0300

csiph-web