#!/usr/bin/env python
import os
import sys
def read_file(fpath):
Block_Size = 1024
with open(fpath,"r") as f:
while True:
block = f.read(Block_Size)
if block:
yield block
else:
return
for i in read_file(sys.argv[1]):
print(i)
时间: 2024-11-05 09:02:44