In article <[email protected]>,
Tom  <[email protected]> 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 an error at the
>following code.
>
>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?

Use open(fname, 'U')
-- 
Aahz ([email protected])           <*>         http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just        
refer to comments in code as 'lies'. :-)"
--Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to