Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'lines,': 0.07; 'subject:file': 0.07; 'advance': 0.07; 'happen.': 0.09; 'mess': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'spaces': 0.09; 'subject:into': 0.09; 'subject:How': 0.10; 'windows': 0.15; '"new': 0.16; 'carriage': 0.16; 'left,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'spacing': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'url:home': 0.24; 'file.': 0.24; 'header:X-Complaints-To:1': 0.27; 'character': 0.29; '+0100,': 0.31; 'mod': 0.31; 'vertical': 0.31; 'cases': 0.33; 'used,': 0.33; 'could': 0.34; 'done.': 0.35; 'but': 0.35; 'add': 0.35; 'subject:?': 0.36; 'two': 0.37; 'received:76': 0.38; 'apple': 0.38; 'feed': 0.38; 'machines': 0.38; 'to:addr :python-list': 0.38; 'ability': 0.39; 'moving': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'lost': 0.61; 'mentioned': 0.61; 'took': 0.61; 'first': 0.61; 'back': 0.62; 'world': 0.66; 'believe': 0.68; 'line,': 0.68; 'repeat': 0.74; 'paper': 0.75; '(while': 0.84; 'delay.': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: How to write fast into a file in python? Date: Sat, 18 May 2013 15:14:31 -0400 Organization: > Bestiaria Support Staff < References: <87f9a3d4-427e-472f-bee7-9501ba842b36@googlegroups.com> <51961B73.2070401@davea.name> <51966d15$0$29997$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: adsl-76-249-28-99.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368904489 news.xs4all.nl 15864 [2001:888:2000:d::a6]:43652 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45523 tOn Sat, 18 May 2013 08:49:55 +0100, Fábio Santos declaimed the following in gmane.comp.python.general: > You mentioned "\n" translating to two lines, but this won't happen. Windows > will not mess with what you write to your file. It's just that > traditionally windows and windows programs use \r\n instead of just \n. I > think it was for compatibility with os/2 or macintosh (I don't remember > which), which used \r for newlines. > Neither... It goes back to Teletype machines where one sent a carriage return to move the printhead back to the left, then sent a line feed to advance the paper (while the head was still moving left), and in some cases also provided a rub-out character (a do-nothing) to add an additional character time delay. TRS-80 Mod 1-4 used for "new line", I believe Apple used for "new line"... And both lost the ability to move down the page without also resetting the carriage to the left. In a world where both is used, one could draw a vertical line of | by just spacing across the first line, printing |, then repeat | until done. To do the same with conventional is "new line/return" one has to transmit all those spaces for each line... At 300baud, that took time.... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/