pip-helper/client.pyw

57 lines
1.2 KiB
Python
Raw Normal View History

2023-04-27 21:56:53 +08:00
from tkinter import *
from tkinter import messagebox, ttk
import platform
import os
import webbrowser
root = Tk()
ml = os.getcwd()
System = platform.system()
file_error = '文件丢失,请重新安装'
def windows_run():
if os.path.exists("{ml}\system_cz.exe"):
2023-04-27 21:59:14 +08:00
os.system('start {ml}\windows\system_cz.exe')
2023-04-27 21:56:53 +08:00
else:
messagebox.showerror('system', '文件丢失,请重新安装')
pass
pass
def Not_windows_run():
if os.path.exists('{ml}\system_command.exe'):
2023-04-27 21:59:14 +08:00
os.system('.\{ml}\Not\system_command.pyw')
2023-04-27 21:56:53 +08:00
else:
messagebox.showerror('system', file_error)
pass
pass
def system_jc():
if System != 'Windows':
Not_windows_run()
else:
windows_run()
pass
pass
def update():
messagebox.showwarning('system', '暂无做完')
pass
def exit_exe():
root.destroy()
pass
# Button and Label
Label(root, text='启动器').pack()
Button(root, text='启动程序', command=system_jc).pack()
Button(root, text='更新日志', command=update).pack()
Button(root, text='退出', command=exit_exe).pack()
# mainloop
root.title('启动器')
root.geometry('200x200+400+400')
root.mainloop()