Removing newlines from string on windows (without replacing)
tom.sully at gmx.com
Sat Jul 25 21:27:37 CEST 2009
This is my first post to this mailing list, so hi :)
I have an annoying problem. While I mainly use Linux when I distribute
this program to friends and on the internet, it'll get used on Windows.
So, I tested my python program on my Windows Vista dual boot, running
the same version of python (2.6) as my Linux, and got an error at the
s = sauce.replace("\n", "")
Sauce is a string, read from a file, that I need to remove newlines
from. This code works fine in Linux, but not in Windows. rstrip("\n")
won't work for me, so anybody know how to get this working on Windows?
More information about the Python-list