> (Even if it so happens sauce
> will only ever have LFs at the end, it's still better to use the
> method that is closest to your intended meaning.)
Oh, you're right. I'll change that now. I suppose removing all
endlines will be better, incase, somehow, endlines in the middle of
the line arrises.
In article ,
Tom wrote:
>
>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
On Jul 26, 1:13 pm, Tom wrote:
> The thing that was messing it up was that the endlines are handled
> differently on each each OS, so I changed the code to strip the
> endlines to be:
>
> if os.name == "nt":
> s = sauce.rstrip("\r\n")
> else:
> s = sauce.replace("\n", "")
Sorry for not providing enough information - and Rhodri, for sending
my second message I used the GMX webmail client rather than my usual
Linux client as I was testing it on windows. That must have screwed it
up, I need to download Thunderbird on Mozzila.
The thing that was messing it up was that
Tom wrote:
> 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?
I'm pretty sure this works regardless o
On Sat, 25 Jul 2009 20:27:37 +0100, Tom wrote:
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
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)