【Python】GUI界面简单呈现
1、Tkinter界面GUI
2、EasyGUI
from easygui import *
import sys
folder = r'##############'
title = "这是GUI的标题"
label_read = r'##############'
label_write = r'##############'
while 1:
with open(folder + label_read, 'r', encoding="utf-8") as read_file:
lines = read_file.readlines()
with open(folder + label_write, 'r',encoding="utf-8") as write_file:
position = len(write_file.readlines())
boxes = ["label1", "label2", "label3"]
count = 0
for line in lines:
count += 1
line = line.strip()
text=line.split("\t")[2]
msg="".join([st for st in text if ord(st) in range(65536)])
print(count,msg)
if count <= position or line.split("\t")[-2] == "0":
continue
choice1=choicebox(msg, title, boxes) -
with open(folder + label_write, 'a',encoding="utf-8") as write_file:
content = line + "\t" + choice1
write_file.write(content+'\n')