__author__ = 'Administrator' import codecs def blocks(file, size=65536): while True: b = file.read(size) if not b: break yield b with codecs. open('h:/iis/u_ex141026.log', 'r','gbk', 'ignore') as f: print( sum(bl.count("\n") for bl in blocks(f))…
转载地址:http://blog.csdn.net/leidengyan/article/details/5686691 Eclipse Console 加大显示的行数: 在 Preferences-〉Run/Debug-〉Console里边,去掉对Limit console output的选择,或者选择,设置一下buffer size的设定值 进制弹出: Preferences-〉 Run/Debug-〉Console里边 取消勾选 Show when program writes to st…