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?
>
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?
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
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
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
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
Hi.,
Is there any function for reading a file while ignoring *\n* occuring in the
file?
--
http://mail.python.org/mailman/listinfo/python-list