1.首先制作一个简单的可视化界面,使用python自带库tkinter,代码如下
from tkinter.scrolledtext import ScrolledText
from tkinter import *
import tkinter as tk
import os
dop=[]
doom=[]
window = Tk()
window.title("正交表()") # title() 定义这个窗口的标题
window.geometry("850x600") # geometry() 定义窗口的大小
srcLanguage = StringVar()
srcLanguage.set(',')
Label(window, text="内分隔符:",font=("隶书", 12)).place(x=680, y=170)
languages = (',', ' ', ',', '.','。')
ttk.Combobox(window, values=languages, width=6, textvariable=srcLanguage, state='readonly').place(x=760, y=170)
Label(window, text="--输入数据--",font=("隶书", 14)).place(x=270, y=1)
scr = scrolledtext.ScrolledText(window, width=80, height=15, font=("隶书", 12)) # 滚动文本框(宽,高(这里的高应该是以行数为单位),字体样式)
scr.place(x=15, y=25) # 滚动文本框在页面的位置
Label(window, text="--输出结果为--",font=("隶书", 14)).place(x=265, y=270)
scr1 = scrolledtext.ScrolledText(window, width=80, height=15, font=("隶书", 12)) # 滚动文本框(宽,高(这里的高应该是以行数为单位),字体样式)
scr1.place(x=15, y=300) # 滚动文本框在页面的位置
srcLanguag = StringVar()
srcLanguag.set(':')
Label(window, text="项目分隔:",font=("隶书", 12)).place(x=680, y=80)
language = (':', ';', ';', ':','>','<')
ttk.Combobox(window, values=language, width=6, textvariable=srcLanguag, state='readonly').place(x=760, y=80)
button2 = Button(window, text="运 行",bg="green",font=("隶书", 20), command=yunxin) #按键
button2.place(x=540, y=560, width=80, height=30) #按键位置
button3 = Button(window, text="导 出",bg="yellow",font=("隶书", 20), command=daocu) #按键
button3.place(x=290, y=560, width=80, height=30) #按键位置
button1 = Button(window, text="删 除",bg="red", font=("隶书", 20), command=cancelMsg) #anjian
button1.place(x=40, y=560, width=80, height=30) #按键位置
Label(window, text&#