Python 2.6, File read() problems in Windows Xp

Li Wang li.wang.d at gmail.com
Fri May 8 11:04:34 CEST 2009


Hi:

Problem solved

Thank you very much, it works, It is my own problem:)

All the best,
Li

2009/5/8 Li Wang <li.wang.d at gmail.com>:
> 2009/5/8 Chris Rebert <clp2 at rebertia.com>:
>> On Thu, May 7, 2009 at 10:04 PM, Li Wang <li.wang.d at gmail.com> wrote:
>>> Hi all:
>>>
>
>> the file, e.g. open("the_file.xls", "rb")
>> Unlike *nix, Windows differentiates between binary and text files,
>> hence the need for the "b" flag to specify which you're dealing with.
>
> Hi
> Thank you very much for reply,
>
> The method doesn't work.
> Here is the problem: after reading the whole fie as a string, I need
> the string to be made of 8bits-symbols.
>
> I do not mind what's the content in the file, what I need to do is
> something like reading the file byte by byte and concatenate these
> bytes into a single string.
>
> Any suggestions?
>
> Thank you very much
>
>
>
>
>
> --
> Li
> ------
> Time is all we have
> and you may find one day
> you have less than you think
>



-- 
Li
------
Time is all we have
and you may find one day
you have less than you think



More information about the Python-list mailing list