У меня есть файл, который выглядит следующим образом alt text http://img40.imageshack.us/img40/4581/crapq.png Теперь показано 5 строк.Однако запуск этого скрипта
with open('hello.txt', 'r') as hello: for line in hello: print line,
дает
num 1 ctl00$header1$Login1$txtUserName=ыют;CBШ▌
и все.Как я могу прочитать весь файл?ТИА
entire_file = open('hello.txt', 'rb').read() print 'number of \\n: %d, number of bytes %d' % ( entire_file.count('\n'), len(entire_file))