file.read problem
Farshid Lashkari
flashkNO at SPAMgmail.com
Fri Feb 17 01:46:33 EST 2006
> When I do this I get the first 634 bytes. I tried using the:
> f = open('myfile,'rb')
> option, but now there are a few 0x0D bytes extra in myfile. 0x0D =
> Carriage return. How can I make a program that not puts in the 0x0D
> bytes in windows.
Try opening the file in 'rbU' mode. This will use universal newline mode
and convert all carriage returns to line feeds.
-Farshid
More information about the Python-list
mailing list