[Pythonmac-SIG] IDE patch to convert UNIX/MSDOS line feeds to carriage returns

Just van Rossum just@letterror.com
Fri, 21 May 1999 23:45:29 +0200


At 5:19 PM -0400 5/21/99, Oliver Steele wrote:
>Despite the best intentions of Anarchie and Internet Explorer, I often end
>up with Python source files (and other text files that I'd like to edit with
>PythonIDE) that use '\n' instead of '\r' as a line separator (and therefore
>show up as garbage in the text editing window).
>
>The patch at
><http://www.cs.brandeis.edu/~steele/sources/PythonIDE-crlf-patch.txt> causes
>PythonIDE to notice when you open such a file, and offer to convert its
>'\n's to '\r's.  It consists of 14 lines of code that go at the end of
>Editor.__init__ in {Python}:IDE:IDELib:IDE:PyEdit.py.

Cool, thanks. I've checked it in, but I changed the behavior so that the
dialog comes before the edit window appears.

(Thanks for digging into the ugly guts of PyEdit.py ;-)

Just