[Python] 纯文本查看 复制代码import tkinter as tk
from tkinter import ttk
import requests,os,urllib3,time,hashlib,json
from lxml import etree
class PyWinDesign:
def __init__(self, 启动窗口):
self.启动窗口 = 启动窗口
self.启动窗口.title('学小易查题接口PC ——by 浅山藏')
self.启动窗口.resizable(width=True, height=True)
screenwidth = self.启动窗口.winfo_screenwidth()
screenheight = self.启动窗口.winfo_screenheight()
size = '%dx%d+%d+%d' % (596, 430, (screenwidth - 596) / 2, (screenheight - 430) / 2)
self.启动窗口.geometry(size)
self.标签1_标题 = tk.StringVar()
self.标签1_标题.set('账号:')
self.标签1 = tk.Label(self.启动窗口,textvariable=self.标签1_标题,anchor=tk.W)
self.标签1.place(x=380,y=19,width=35,height=25)
self.标签2_标题 = tk.StringVar()
self.标签2_标题.set('密码:')
self.标签2 = tk.Label(self.启动窗口,textvariable=self.标签2_标题,anchor=tk.W)
self.标签2.place(x=381,y=50,width=36,height=27)
self.编辑框1 = tk.Text(self.启动窗口,wrap=tk.NONE)
self.编辑框1.insert(tk.END,'')
self.编辑框1.place(x=438,y=19,width=150,height=25)
self.编辑框2_标题 = tk.StringVar()
self.编辑框2 =tk.Entry(self.启动窗口, textvariable=self.编辑框2_标题, show='*')
self.编辑框2.place(x=438,y=54,width=150,height=25)
self.按钮1_标题 = tk.StringVar()
self.按钮1_标题.set('登录')
self.按钮1 = tk.Button(self.启动窗口,textvariable=self.按钮1_标题,command=self.按钮1_被鼠标左键单击)
self.按钮1.place(x=483,y=90,width=56,height=41)
self.编辑框3 = tk.Text(self.启动窗口,wrap=tk.NONE)
self.编辑框3.insert(tk.END,'')
self.编辑框3.place(x=22,y=26,width=332,height=55)
self.按钮2_标题 = tk.StringVar()
self.按钮2_标题.set('查题