f = open('myfile,'r') a = f.read(5000) 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. In linux the first 2 lines are working perfectly.