Re: Writelines() a bit confusing

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 10:31:50 -0300, Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> escribió: > so you'd want this: > > f.writelines([x+os.linesep for x in strings]) > > or something similar. You would use os.linesep *only* if the file was opened in binary mode - unusual if you want to write l

Re: Writelines() a bit confusing

2007-05-19 Thread aiwarrior
On May 19, 2:46 pm, "Gre7g Luterman" <[EMAIL PROTECTED]> wrote: > "aiwarrior" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > If file.WriteLines( seq ) accepts a list and it says it writes lines, > > why does it write the whole list in a single line. Be cause of that > > the r

Re: Writelines() a bit confusing

2007-05-19 Thread Gre7g Luterman
"aiwarrior" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If file.WriteLines( seq ) accepts a list and it says it writes lines, > why does it write the whole list in a single line. Be cause of that > the reverse of file.writelines(seq) is not file.readlines(). > Are the assumptions

Re: Writelines() a bit confusing

2007-05-19 Thread Steve Holden
aiwarrior wrote: > If file.WriteLines( seq ) accepts a list and it says it writes lines, > why does it write the whole list in a single line. Be cause of that > the reverse of file.writelines(seq) is not file.readlines(). > Are the assumptions i made correct? If yes why is this so? > > I find a fu

Re: Writelines() a bit confusing

2007-05-19 Thread Stefan Sonnenberg-Carstens
aiwarrior schrieb: > If file.WriteLines( seq ) accepts a list and it says it writes lines, > why does it write the whole list in a single line. Be cause of that > the reverse of file.writelines(seq) is not file.readlines(). > Are the assumptions i made correct? If yes why is this so? > > I find a f

Writelines() a bit confusing

2007-05-19 Thread aiwarrior
If file.WriteLines( seq ) accepts a list and it says it writes lines, why does it write the whole list in a single line. Be cause of that the reverse of file.writelines(seq) is not file.readlines(). Are the assumptions i made correct? If yes why is this so? I find a function called writelines not