This commit is contained in:
dengrb1
2023-07-24 20:53:59 +08:00
committed by GitHub
parent 81035325db
commit 46c4987935
3 changed files with 46 additions and 4 deletions

39
ol_web.pyw Normal file
View File

@@ -0,0 +1,39 @@
import os
import webbrowser
from tkinter import *
from tkinter import messagebox
import sys
root = Tk()
ml = os.getcwd()
# def
def china_github():
webbrowser.open('https://kgithub.com/dengrb1/chatgpt')
sys.exit()
def github():
webbrowser.open('https://github.com/dengrb1/chatgpt')
sys.exit()
def quit_exe():
sys.exit()
# Button
cg_b = Button(root, text='国内镜像官网', command=china_github)
g_b = Button(root , text='国外官网', command=github)
q_b = Button(root ,text='返回', command=quit_exe)
# pack
Label(root , text='官网').pack()
cg_b.pack()
g_b.pack()
q_b.pack()
# mainloop
root.title('官网')
root.geometry('200x220')
root.mainloop()