Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>No, <code>\r</code> (carriage return, or <code>CR</code>) is only correct for <em>old</em> Mac OS, so up to release 9.</p> <p>OS X is a complete rewrite, and now a UNIX-based OS. It uses <code>\n</code> (line feed, or <code>LF</code>).</p> <p>From <a href="http://en.wikipedia.org/wiki/Newline#Representations" rel="nofollow noreferrer">Wikipedia on the subject of Newline</a>:</p> <blockquote> <ul> <li><code>LF</code>: Multics, Unix and Unix-like systems (GNU/Linux, Mac OS X, FreeBSD, AIX, Xenix, etc.), BeOS, Amiga, RISC OS and others.</li> </ul> <p>[...]</p> <ul> <li><code>CR</code>: Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II family, Mac OS up to version 9 and OS-9</li> </ul> </blockquote> <p>See <a href="https://stackoverflow.com/questions/419291/historical-reason-behind-different-line-ending-at-different-platforms">Historical reason behind different line ending at different platforms</a> for some history behind this.</p> <p>Instead, it's Scintilla that is in the wrong here. The <a href="http://www.scintilla.org/ScintillaDoc.html#LineEndings" rel="nofollow noreferrer">Line endings documenation</a> suggests it defaults to <code>\r</code> when on Mac:</p> <blockquote> <p>Scintilla can interpret any of the Macintosh (<code>\r</code>), Unix (<code>\n</code>) and Windows (<code>\r\n</code>) line ends.</p> </blockquote> <p>You can use the <a href="http://www.scintilla.org/ScintillaDoc.html#SCI_SETEOLMODE" rel="nofollow noreferrer"><code>SCI_SETEOLMODE()</code> function</a> to alter that behaviour, whatever the Python binding equivalent is should be passed the <code>os.linesep</code> value to make Scintilla use the correct line separator for your platform.</p> <p>I see that there is a <a href="http://pyqt.sourceforge.net/Docs/QScintilla2/classQsciScintilla.html#a0f2353468d2c37abe9c933d4ac0478ad" rel="nofollow noreferrer"><code>QsciScintilla.setEolMode()</code> method</a> and a <a href="http://pyqt.sourceforge.net/Docs/QScintilla2/classQsciScintilla.html#ab4b6b4286a74e173a86de0a7f55241d5" rel="nofollow noreferrer"><code>EOLMode</code> enum</a> to accomplish that; I guess you'll need to map python line ending variants to the enum and pass the right enum value to the <code>.setEolMode()</code> method.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload