Re: File Reading related query

2008-09-17 Thread r0g
Fredrik Lundh wrote: > Usman Ajmal wrote: > >> Is there any function for reading a file while ignoring *\n* occuring >> in the file? > > can you be a bit more precise? are we talking about text files or > binary files? how do you want to treat any newlines that actually > appear in the file? >

Re: File Reading related query

2008-09-17 Thread Usman Ajmal
Thanks Tim. That rstrip('\r\n') worked. :) On Wed, Sep 17, 2008 at 10:45 AM, Tim Chase <[EMAIL PROTECTED]>wrote: > Is there any function for reading a file while ignoring *\n* occuring in >>> the file? >>> >> >> can you be a bit more precise? are we talking about text files or binary >> files?

Re: File Reading related query

2008-09-17 Thread Tim Chase
I am talking about text file which contain multiple lines e.g following three lines are there in my textfile.txt this is python list where we get support from geeks I want sentence = this is python list where we get support from geeks whereas when i use simple read() i get something like this

Re: File Reading related query

2008-09-17 Thread Tim Chase
Is there any function for reading a file while ignoring *\n* occuring in the file? can you be a bit more precise? are we talking about text files or binary files? how do you want to treat any newlines that actually appear in the file? I believe the OP is referencing this behavior: for l

Re: File Reading related query

2008-09-17 Thread Usman Ajmal
I am talking about text file which contain multiple lines e.g following three lines are there in my textfile.txt this is python list where we get support from geeks I want sentence = this is python list where we get support from geeks whereas when i use simple read() i get something like this

Re: File Reading related query

2008-09-17 Thread Fredrik Lundh
Usman Ajmal wrote: Is there any function for reading a file while ignoring *\n* occuring in the file? can you be a bit more precise? are we talking about text files or binary files? how do you want to treat any newlines that actually appear in the file? -- http://mail.python.org/mailma

File Reading related query

2008-09-17 Thread Usman Ajmal
Hi., Is there any function for reading a file while ignoring *\n* occuring in the file? -- http://mail.python.org/mailman/listinfo/python-list