Reading corrupted file in python -


i've got file, looks alt text http://img40.imageshack.us/img40/4581/crapq.png there 5 lines shown. running script

with open('hello.txt', 'r') hello:     line in hello:         print line, 

gives

num 1 ctl00$header1$login1$txtusername=ыют;cbШ▌ 

and that's all. how can read entire file? tia

entire_file = open('hello.txt', 'rb').read()  print 'number of \\n: %d, number of bytes %d' % (     entire_file.count('\n'), len(entire_file)) 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -