It is working, but I don't know why???

Alex Martelli aleaxit at yahoo.com
Wed May 16 09:34:58 EDT 2001


"Bernd Prager" <vze2nbmq at verizon.net> wrote in message
news:pZuM6.22234$0W5.4424670 at typhoon1.ba-dsg.net...
    ...
> So totaly frustated I created a new file. Wrote the first lines by hand
and
> attached the original file
> to this. And SUDDENLY all the lines from the original filed HAD ^M's on
> their end!!!
> I replaced them and now it is working fine. Isn't that weird???

Yes, it is -- it's vim trying to be helpful and convenient:-(.  It
notices every line in the file ends with ^M, so it opens the file
in 'Dos mode', keeping the ^M's "out of the way", but saving them
back to disk at the end... editing with "vim -b thefile.py" may
help you avoid this "helpful and convenient" behavior (there are
other ways, too, but comp.editors may be more appropriate for
in-depth discussion).


Alex






More information about the Python-list mailing list