import os

f = open("d:/work/data/药品说明书.csv", "r", encoding='gb18030')

count = 0
buff = ""
line_index = 0
while (True):
    try:
        line = f.readline()
        line_index = line_index + 1
    except Exception as e:
        print (line_index)
        print (e)
        break
    if line == None or line == '':
        print("finished %d " % count)
        break
    if line.strip().endswith(',,,,'):
        buff = buff + line
        print(buff)
        print("="*60)
        buff = ""
        count = count + 1
    else:
        buff = buff + line
f.close()