Python 2.6, File read() problems in Windows Xp
li.wang.d at gmail.com
Fri May 8 05:04:34 EDT 2009
Thank you very much, it works, It is my own problem:)
All the best,
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.
> 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
> Time is all we have
> and you may find one day
> you have less than you think
Time is all we have
and you may find one day
you have less than you think
More information about the Python-list