在python中读取损坏的文件

2024-10-01 22:42:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个文件,看起来像alt text http://img40.imageshack.us/img40/4581/crapq.png 现在显示了5条线。但是运行此脚本

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

给予

^{pr2}$

仅此而已。如何读取整个文件?TIA公司


Tags: 文件text脚本httphellopngwithline

热门问题