diff --git a/query.py b/query.py new file mode 100644 index 0000000..973e02b --- /dev/null +++ b/query.py @@ -0,0 +1,28 @@ +# -*- coding: gbk -*- +import csv +import re + +case = input("�����벡������,��Ϊ��ʾ��:") +Start_date = input("�����뿪ʼ����,��Ϊ��ʾ��:") +End_date = input("�������������,��Ϊ��ʾ��:") +keyword = input("�������ѯ�ؼ���,��Ϊ��ʾ��:") +with open('test.csv', 'r', encoding='utf-8') as f: + cs = list(csv.reader(f)) + for i in cs: + name = str(i[1]) + Bdate = str(i[2]) + Edate = str(i[3]) + Time = str(i[4]) + thought = str(i[5]) + if case == name or case == "��": + if Start_date == Bdate or Start_date == "��": + if End_date == Edate or End_date == "��": + s = re.findall(keyword, thought) + if keyword == "��" : + print(name + "��" + Bdate + Time + thought) + elif s!=[]: + print(name+"��"+Bdate+Time+thought) + + + +