Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f5cad3cd3 |
25
1chat.pyw
25
1chat.pyw
@@ -1,25 +0,0 @@
|
|||||||
import sys
|
|
||||||
from PyQt5.QtCore import QUrl
|
|
||||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction
|
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|
||||||
|
|
||||||
class Browser(QMainWindow):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.setWindowTitle('浏览器')
|
|
||||||
|
|
||||||
self.browser = QWebEngineView()
|
|
||||||
self.browser.setUrl(QUrl('https://1.1ai.fun/'))
|
|
||||||
self.setCentralWidget(self.browser)
|
|
||||||
|
|
||||||
refresh_button = QAction('刷新', self)
|
|
||||||
refresh_button.triggered.connect(self.browser.reload)
|
|
||||||
self.toolbar = self.addToolBar('Refresh')
|
|
||||||
self.toolbar.addAction(refresh_button)
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
browser = Browser()
|
|
||||||
browser.showMaximized()
|
|
||||||
sys.exit(app.exec_())
|
|
||||||
@@ -5,12 +5,12 @@ from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|||||||
class BrowserWindow(QMainWindow):
|
class BrowserWindow(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setWindowTitle("Chat Browser")
|
self.setWindowTitle("AI Browser")
|
||||||
self.setGeometry(100, 100, 800, 600)
|
self.setGeometry(100, 100, 800, 600)
|
||||||
|
|
||||||
# Create the QWebEngineView widget
|
# Create the QWebEngineView widget
|
||||||
self.web_view = QWebEngineView(self)
|
self.web_view = QWebEngineView(self)
|
||||||
self.web_view.load(QUrl("https://chat2.aiyunos.top"))
|
self.web_view.load(QUrl("https://chat2.aitianhu.top"))
|
||||||
self.setCentralWidget(self.web_view)
|
self.setCentralWidget(self.web_view)
|
||||||
|
|
||||||
# Create the QToolBar widget and add a QAction for the refresh button
|
# Create the QToolBar widget and add a QAction for the refresh button
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
import openai
|
|
||||||
import re
|
|
||||||
|
|
||||||
# 定义用于与API交互的OpenAI API密钥
|
|
||||||
openai.api_key = str(input('请输入你的API key:'))
|
|
||||||
|
|
||||||
# 定义所需模型,这里使用Davinci,是GPT-3.5中的最大模型
|
|
||||||
model_engine = "davinci"
|
|
||||||
|
|
||||||
# 定义对话处理函数
|
|
||||||
def chat(prompt):
|
|
||||||
# 调用GPT-3.5 API生成对话回复
|
|
||||||
response = openai.Completion.create(
|
|
||||||
engine=model_engine,
|
|
||||||
prompt=prompt,
|
|
||||||
temperature=0.7, # 控制对话生成的创造力
|
|
||||||
max_tokens=4000, # 控制最多可输出的token数
|
|
||||||
n=1,
|
|
||||||
stop=None,
|
|
||||||
timeout=30,
|
|
||||||
)
|
|
||||||
|
|
||||||
# 获取生成回复文本
|
|
||||||
answer = response.choices[0].text
|
|
||||||
|
|
||||||
# 对回复进行处理,去除一些特殊字符和回车符
|
|
||||||
answer = re.sub('[^0-9a-zA-Z.,!?/:;\"\'\s]|(\r?\n)+', '', answer).strip()
|
|
||||||
|
|
||||||
return answer
|
|
||||||
|
|
||||||
# 测试代码
|
|
||||||
while True:
|
|
||||||
prompt = input("You: ")
|
|
||||||
if prompt.lower() in ['bye', 'goodbye']:
|
|
||||||
print("chatGPT: Goodbye!")
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
answer = chat(prompt)
|
|
||||||
print("chatGPT:", answer)
|
|
||||||
81
chatGPT.esp
Normal file
81
chatGPT.esp
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
[Info]
|
||||||
|
Titel = chatGPT
|
||||||
|
Version = 0.1.3
|
||||||
|
Date = 1682755680
|
||||||
|
GUID = {35892C8A-0057-4E93-BAFD-F5C682103C1C}
|
||||||
|
Author = dengrb1
|
||||||
|
EMail = drb12311@163.com
|
||||||
|
Web = https://github.com/dengrb1/chatgpt
|
||||||
|
Readme =
|
||||||
|
Licence =
|
||||||
|
[File]
|
||||||
|
ProgDir = E:\python_file\chatgpt\dist\
|
||||||
|
DataDir =
|
||||||
|
ProgExe = client.exe
|
||||||
|
IconID = 0
|
||||||
|
[Task]
|
||||||
|
Desktop = 1
|
||||||
|
StartProg = 1
|
||||||
|
StartMenu = 1
|
||||||
|
UserTask = 0
|
||||||
|
SpecialTask = 1
|
||||||
|
DataInstall = 0
|
||||||
|
DataOption =
|
||||||
|
IUpdater = 0
|
||||||
|
ProgParameter =
|
||||||
|
Mutex = 0
|
||||||
|
MutexString =
|
||||||
|
Reboot = 0
|
||||||
|
Script = 0
|
||||||
|
ScriptFile =
|
||||||
|
ScriptUI = 0
|
||||||
|
ScriptUIFile =
|
||||||
|
NoUnistall = 0
|
||||||
|
NoDelAll = 0
|
||||||
|
[StartMenue]
|
||||||
|
DefaultDir = chatWEB
|
||||||
|
ProgLink = chatGPT
|
||||||
|
OptHelp = 0
|
||||||
|
Help =
|
||||||
|
OptURL = 0
|
||||||
|
URL = http://
|
||||||
|
OptExe = 0
|
||||||
|
Exe =
|
||||||
|
OptIUpd = 0
|
||||||
|
Unistall = 1
|
||||||
|
[Settings]
|
||||||
|
Language = chinese.ins|
|
||||||
|
Bitmap = C:\Program Files\EasySetup\Bitmaps\default.jpg
|
||||||
|
HeaderIcon =
|
||||||
|
NoCopy = 0
|
||||||
|
NoCopyExt =
|
||||||
|
SetupExe = chatGPT
|
||||||
|
DefaultDir = c:\chatGPT
|
||||||
|
DataDir =
|
||||||
|
SetupDir = C:\Users\Administrator\Desktop\
|
||||||
|
Archiver = 0
|
||||||
|
Split = 0
|
||||||
|
ZipFile = 0
|
||||||
|
[Upload]
|
||||||
|
Setup = 0
|
||||||
|
SetupFTP =
|
||||||
|
ZIP = 0
|
||||||
|
ZipFTP =
|
||||||
|
IUpdater = 0
|
||||||
|
IUpdFTP =
|
||||||
|
VIF = 0
|
||||||
|
VifFILE =
|
||||||
|
VifFTP =
|
||||||
|
HTML = 0
|
||||||
|
HtmlFiles = 0
|
||||||
|
PAD = 0
|
||||||
|
PadSRC =
|
||||||
|
PadFTP =
|
||||||
|
[IUpdater]
|
||||||
|
Info =
|
||||||
|
URL =
|
||||||
|
NoPart = 0
|
||||||
|
ReStart = 0
|
||||||
|
UseProxy = 0
|
||||||
|
ProxyServer =
|
||||||
|
ProxyPort = 0
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
import openai
|
|
||||||
import os
|
|
||||||
from time import sleep
|
|
||||||
import sys
|
|
||||||
|
|
||||||
ml = os.getcwd()
|
|
||||||
file_path = os.path.join(ml, "api_key.txt")
|
|
||||||
|
|
||||||
# 设置openai库的API认证密钥
|
|
||||||
def api_key():
|
|
||||||
input1 = input("请输入API_key:")
|
|
||||||
if input1 == None:
|
|
||||||
print('error: Not input')
|
|
||||||
sleep(4)
|
|
||||||
sys.exit()
|
|
||||||
else:
|
|
||||||
openai.api_key = input1
|
|
||||||
|
|
||||||
# 设置GPT-3.5模型的引擎ID
|
|
||||||
model_engine = 'text-davinci-003'
|
|
||||||
|
|
||||||
# 循环读入用户输入并输出聊天结果
|
|
||||||
def input_print():
|
|
||||||
while True:
|
|
||||||
# 获取用户输入
|
|
||||||
prompt = input("你好,请问有什么需要帮助的吗?\n")
|
|
||||||
|
|
||||||
# 调用openai.ChatCompletion.create()方法来获取聊天结果
|
|
||||||
response = openai.Completion.create(
|
|
||||||
engine='text-davinci-003',
|
|
||||||
prompt=prompt,
|
|
||||||
temperature=0.7,
|
|
||||||
max_tokens=210,
|
|
||||||
top_p=1,
|
|
||||||
frequency_penalty=0,
|
|
||||||
presence_penalty=0
|
|
||||||
)
|
|
||||||
result = response['choices'][0]['text'].strip()
|
|
||||||
print(f"chatGPT:{result}")
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print('注意,本程序是测试程序,如有问题,非常正常')
|
|
||||||
sleep(2)
|
|
||||||
api_key()
|
|
||||||
# 设置GPT-3.5模型的引擎ID
|
|
||||||
model_engine = 'text-davinci-003'
|
|
||||||
input_print()
|
|
||||||
27
chatkey.pyw
27
chatkey.pyw
@@ -1,27 +0,0 @@
|
|||||||
from PyQt5.QtCore import QUrl
|
|
||||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction
|
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|
||||||
|
|
||||||
class BrowserWindow(QMainWindow):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.setWindowTitle("AI Browser")
|
|
||||||
self.setGeometry(100, 100, 800, 600)
|
|
||||||
|
|
||||||
# Create the QWebEngineView widget and set the URL to "https://nav.chatkey.top/"
|
|
||||||
self.web_view = QWebEngineView(self)
|
|
||||||
self.web_view.load(QUrl("https://nav.chatkey.top/"))
|
|
||||||
self.setCentralWidget(self.web_view)
|
|
||||||
|
|
||||||
# Create the QToolBar widget and add a QAction for the refresh button
|
|
||||||
toolbar = QToolBar(self)
|
|
||||||
self.addToolBar(toolbar)
|
|
||||||
refresh_action = QAction("Refresh", self)
|
|
||||||
refresh_action.triggered.connect(self.web_view.reload)
|
|
||||||
toolbar.addAction(refresh_action)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app = QApplication([])
|
|
||||||
window = BrowserWindow()
|
|
||||||
window.show()
|
|
||||||
app.exec_()
|
|
||||||
107
client.pyw
107
client.pyw
@@ -1,69 +1,96 @@
|
|||||||
import os
|
import os
|
||||||
from tkinter import *
|
import platform
|
||||||
|
import tkinter as tk
|
||||||
from tkinter import messagebox
|
from tkinter import messagebox
|
||||||
from time import sleep
|
from time import sleep
|
||||||
import sys
|
|
||||||
import webbrowser
|
|
||||||
|
|
||||||
# Define constants
|
# Define constants
|
||||||
CURRENT_DIR = os.getcwd()
|
CURRENT_DIR = os.getcwd()
|
||||||
FILE_ERROR = '文件丢失,请检查文件内容并重新安装'
|
FILE_ERROR = '文件丢失,请检查文件内容并重新安装'
|
||||||
task = f'taskkill -f -t -im '
|
system = platform.system()
|
||||||
|
|
||||||
''' Define functions
|
# Define functions
|
||||||
程序文件检测'''
|
|
||||||
def open_exe(exe_name):
|
def open_exe(exe_name):
|
||||||
if os.path.exists(os.path.join(CURRENT_DIR, f"{exe_name}.exe")):
|
if os.path.exists(os.path.join(CURRENT_DIR, f"{exe_name}.exe")):
|
||||||
os.system(f"start {exe_name}.exe")
|
os.system(f"start {exe_name}.exe")
|
||||||
else:
|
else:
|
||||||
messagebox.showerror('system', FILE_ERROR)
|
messagebox.showerror('system', FILE_ERROR)
|
||||||
def open_cmd(cmd_name):
|
|
||||||
if os.path.exists(os.path.join(CURRENT_DIR, f"{cmd_name}.cmd")):
|
|
||||||
os.system(f"start {cmd_name}.cmd")
|
|
||||||
else:
|
|
||||||
messagebox.showerror('system', 'cmd服务启动失败,请重新安装')
|
|
||||||
pass
|
|
||||||
pass
|
|
||||||
|
|
||||||
def web_xz():
|
def extkj():
|
||||||
open_exe("xz_main")
|
open_exe("extkj")
|
||||||
|
|
||||||
|
def wuguokai():
|
||||||
|
open_exe("wuguokai")
|
||||||
|
|
||||||
|
def f1():
|
||||||
|
open_exe("aiyunos")
|
||||||
|
|
||||||
def update():
|
def update():
|
||||||
open_exe("update")
|
if os.path.exists(os.path.join(CURRENT_DIR, "update.exe")):
|
||||||
|
os.system("start update.exe")
|
||||||
|
else:
|
||||||
|
messagebox.showerror('update', '更新日志文件丢失,请检查文件并重新安装')
|
||||||
|
|
||||||
|
def user_xy():
|
||||||
|
if os.path.exists(os.path.join(CURRENT_DIR, "使用协议.docx")):
|
||||||
|
os.system("start 使用协议.docx")
|
||||||
|
else:
|
||||||
|
messagebox.showerror('使用协议','文档丢失,请检查文件内容并重新安装')
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
|
||||||
def quit_exe():
|
def quit_exe():
|
||||||
os.system('taskkill -f -t -im free2gpt.exe')
|
os.system('taskkill -f -t -im aiyunos.exe')
|
||||||
os.system('taskkill -f -t -im wuguokai.exe')
|
os.system('taskkill -f -t -im extkj.exe')
|
||||||
os.system('taskkill -f -t -im chatkey.exe')
|
os.system('taskkill -f -t -im gk.exe')
|
||||||
os.system('taskkill -f -t -im bnu120.exe')
|
|
||||||
os.system('taskkill -f -t -im 1chat.exe')
|
|
||||||
os.system('taskkill -f -t -im chat_command.exe')
|
|
||||||
os.system('taskkill -f -t -im sittings.exe')
|
|
||||||
os.system('taskkill -f -t -im update.exe')
|
os.system('taskkill -f -t -im update.exe')
|
||||||
os.system('taskkill -f -t -im xz_chat.exe')
|
os.system('taskkill -f -t -im wuguokai.exe')
|
||||||
os.system('taskkill -f -t -im xz_main.exe')
|
root.destroy()
|
||||||
os.system('taskkill -f -t -im ol_web.exe')
|
|
||||||
sys.exit()
|
def file_jc():
|
||||||
|
if os.path.exists(os.path.join(CURRENT_DIR, "if_file.exe")):
|
||||||
|
os.system('start if_file.exe')
|
||||||
|
else:
|
||||||
|
messagebox.showerror('sittings', '系统文件丢失,程序出现错误!')
|
||||||
|
sleep(1)
|
||||||
|
quit_exe()
|
||||||
|
pass
|
||||||
|
|
||||||
|
def gk():
|
||||||
|
open_exe("gk")
|
||||||
|
|
||||||
|
def sittings():
|
||||||
|
st = tk.Tk()
|
||||||
|
bt_xy = tk.Button(st, text='使用协议(使用前必看)', command=user_xy)
|
||||||
|
bt_update = tk.Button(st, text='更新日志', command=update)
|
||||||
|
bt_gk = tk.Button(st, text='关于', command=gk)
|
||||||
|
bt_fj = tk.Button(st, text='检查文件完整度', command=file_jc)
|
||||||
|
# pack
|
||||||
|
bt_update.pack()
|
||||||
|
bt_gk.pack()
|
||||||
|
bt_fj.pack()
|
||||||
|
bt_xy.pack()
|
||||||
|
# mainloop
|
||||||
|
st.title('设置')
|
||||||
|
st.geometry("200x200+400+600")
|
||||||
|
st.mainloop()
|
||||||
|
|
||||||
def ol_web():
|
|
||||||
messagebox.showwarning("Warning","这个程序为测试版,如有问题,请马上反馈!")
|
|
||||||
open_exe('ol_web')
|
|
||||||
|
|
||||||
# Create GUI
|
# Create GUI
|
||||||
root = Tk()
|
root = tk.Tk()
|
||||||
root.title('chatWEB')
|
root.title('chatGPT')
|
||||||
root.geometry('200x200+400+400')
|
root.geometry('200x200+400+400')
|
||||||
Label(root, text='chatGPT').pack()
|
tk.Label(root, text='chatGPT').pack()
|
||||||
|
|
||||||
bt_web_xz = Button(root, text='网站选择', command=web_xz)
|
bt_w = tk.Button(root, text='wuguokai网站', command=wuguokai)
|
||||||
ol_web_b = Button(root ,text='官方网站', command=ol_web)
|
bt_e = tk.Button(root, text='extkj网站', command=extkj)
|
||||||
quit_bt = Button(root, text='退出', command=quit_exe)
|
bt_f1 = tk.Button(root, text='aitianhu网站', command=f1)
|
||||||
|
quit_bt = tk.Button(root, text='退出', command=quit_exe)
|
||||||
|
|
||||||
Label(root, text='chatWEB')
|
bt_w.pack()
|
||||||
bt_web_xz.pack()
|
bt_e.pack()
|
||||||
ol_web_b.pack()
|
bt_f1.pack()
|
||||||
quit_bt.pack()
|
quit_bt.pack()
|
||||||
Label(root,text='version 1.4 @2023-2024 dengrb1').pack()
|
|
||||||
|
|
||||||
# mainloop
|
# mainloop
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
@@ -4,7 +4,7 @@ from time import sleep
|
|||||||
def run_cmd():
|
def run_cmd():
|
||||||
print("正在启动")
|
print("正在启动")
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
for i in range(4):
|
for i in range(3):
|
||||||
os.system("start powershell")
|
os.system("start powershell")
|
||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
import requests
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
from tqdm import tqdm
|
|
||||||
import threading
|
|
||||||
from time import sleep
|
|
||||||
|
|
||||||
|
|
||||||
print('在使用在线更新时,请安装steam++加速github才可以加速下载')
|
|
||||||
sleep(1)
|
|
||||||
|
|
||||||
url = 'https://api.github.com/repos/dengrb1/chatgpt/releases/latest'
|
|
||||||
|
|
||||||
response = requests.get(url, headers={'Accept': 'application/vnd.github.v3+json'})
|
|
||||||
release_info = json.loads(response.text)
|
|
||||||
|
|
||||||
new_version = release_info['tag_name']
|
|
||||||
current_version = '1.3' # 修改为你的已有版本号
|
|
||||||
|
|
||||||
if new_version != current_version:
|
|
||||||
print('发现新版本: {}'.format(new_version))
|
|
||||||
print('准备更新')
|
|
||||||
|
|
||||||
# 下载最新程序并保存到本地
|
|
||||||
download_url = release_info['assets'][0]['browser_download_url'] # 假设发布包第一个asset为我们要下载的程序
|
|
||||||
file_name = download_url.split('/')[-1]
|
|
||||||
file_path = os.path.join(os.getcwd(), file_name)
|
|
||||||
|
|
||||||
print('开始下载:{}'.format(file_name))
|
|
||||||
response = requests.get(download_url, stream=True)
|
|
||||||
content_size = int(response.headers['Content-Length'])
|
|
||||||
|
|
||||||
def write_data(start, end, url, file_path):
|
|
||||||
headers = {'Range': f'bytes={start}-{end}', 'Accept-Encoding': None}
|
|
||||||
res = requests.get(url, headers=headers, stream=True)
|
|
||||||
with open(file_path, 'rb+') as f:
|
|
||||||
f.seek(start)
|
|
||||||
var = f.tell()
|
|
||||||
f.write(res.content)
|
|
||||||
|
|
||||||
thread_num = 10
|
|
||||||
threads = []
|
|
||||||
step = content_size // thread_num
|
|
||||||
for i in range(thread_num):
|
|
||||||
start = step * i
|
|
||||||
if i == thread_num -1:
|
|
||||||
end = content_size - 1
|
|
||||||
else:
|
|
||||||
end = (i+1) * step - 1
|
|
||||||
t = threading.Thread(target=write_data, kwargs={"start": start, "end": end, "url": download_url, "file_path": file_path})
|
|
||||||
threads.append(t)
|
|
||||||
t.start()
|
|
||||||
for t in threads:
|
|
||||||
t.join()
|
|
||||||
|
|
||||||
print('下载完成!')
|
|
||||||
# 打开更新程序
|
|
||||||
os.startfile(file_path)
|
|
||||||
else:
|
|
||||||
print('当前已是最新版本')
|
|
||||||
@@ -10,7 +10,7 @@ class BrowserWindow(QMainWindow):
|
|||||||
|
|
||||||
# Create the QWebEngineView widget and set the URL to "https://chat.extkj.cn"
|
# Create the QWebEngineView widget and set the URL to "https://chat.extkj.cn"
|
||||||
self.web_view = QWebEngineView(self)
|
self.web_view = QWebEngineView(self)
|
||||||
self.web_view.load(QUrl("https://chat.1.bnu120.space"))
|
self.web_view.load(QUrl("https://chat.extkj.cn"))
|
||||||
self.setCentralWidget(self.web_view)
|
self.setCentralWidget(self.web_view)
|
||||||
|
|
||||||
# Create the QToolBar widget and add a QAction for the refresh button
|
# Create the QToolBar widget and add a QAction for the refresh button
|
||||||
27
free2gpt.pyw
27
free2gpt.pyw
@@ -1,27 +0,0 @@
|
|||||||
from PyQt5.QtCore import QUrl
|
|
||||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction
|
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|
||||||
|
|
||||||
class BrowserWindow(QMainWindow):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.setWindowTitle("AI Browser")
|
|
||||||
self.setGeometry(100, 100, 800, 600)
|
|
||||||
|
|
||||||
# Create the QWebEngineView widget
|
|
||||||
self.web_view = QWebEngineView(self)
|
|
||||||
self.web_view.load(QUrl("https://chatc.free2gpt.xyz/"))
|
|
||||||
self.setCentralWidget(self.web_view)
|
|
||||||
|
|
||||||
# Create the QToolBar widget and add a QAction for the refresh button
|
|
||||||
toolbar = QToolBar(self)
|
|
||||||
self.addToolBar(toolbar)
|
|
||||||
refresh_action = QAction("Refresh", self)
|
|
||||||
refresh_action.triggered.connect(self.web_view.reload)
|
|
||||||
toolbar.addAction(refresh_action)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app = QApplication([])
|
|
||||||
window = BrowserWindow()
|
|
||||||
window.show()
|
|
||||||
app.exec_()
|
|
||||||
@@ -11,9 +11,11 @@ error = 0
|
|||||||
def file_jx(exe_name):
|
def file_jx(exe_name):
|
||||||
maths += 1
|
maths += 1
|
||||||
if os.path.exists(os.path.join(ml, f"{exe_name}")):
|
if os.path.exists(os.path.join(ml, f"{exe_name}")):
|
||||||
pass
|
print(f'文件{maths}正常存在')
|
||||||
else:
|
else:
|
||||||
error += 1
|
error += 1
|
||||||
|
print(f"丢失{error}文件")
|
||||||
|
pass
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def extkj():
|
def extkj():
|
||||||
39
ol_web.pyw
39
ol_web.pyw
@@ -1,39 +0,0 @@
|
|||||||
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('chatWEB')
|
|
||||||
root.geometry('200x220')
|
|
||||||
root.mainloop()
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
os.system('taskkill -f -t -im aiyunos.exe')
|
|
||||||
os.system('taskkill -f -t -im wuguokai.exe')
|
|
||||||
os.system('taskkill -f -t -im extkj.exe')
|
|
||||||
os.system('taskkill -f -t -im python.exe')
|
|
||||||
|
|
||||||
exit()
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
更新日志
|
|
||||||
|
|
||||||
当前版本:1.3 (Not beta or demo)
|
|
||||||
|
|
||||||
0.1.0 DEMO制作完成
|
|
||||||
0.1.1 demo版本增加lbbAI网站
|
|
||||||
0.1.2 demo版本删除lbbAI网站,因为无法使用
|
|
||||||
0.1.3 修复BUG
|
|
||||||
1.0 加入关于模块,更新网站aitianhu.top;修复“退出”按钮
|
|
||||||
的问题
|
|
||||||
1.0.1 修复BUG:移除“检查文件完整度”程序使用
|
|
||||||
(可以在github仓库的old文件夹里面看;修复其他BUG......
|
|
||||||
1.1 修复BUG;紧急修复Windows7无法使用情况!;重新修正UI界面
|
|
||||||
1.1.1 更新chatGPT网站;修改update文本显示设置。新增bnu120聊天网站
|
|
||||||
移除lbbai网站入口
|
|
||||||
1.2 增加lbbai网站;修复BUG;完全移除“关于”模块......
|
|
||||||
1.3 删除lbbai网站;增加aitianhu网站,里面内涵AI画图功能!;加入WiFi功能
|
|
||||||
检测;加入在线更新功能
|
|
||||||
59
update.pyw
59
update.pyw
@@ -1,68 +1,29 @@
|
|||||||
"""基本上,这个文件都是已经提前写好了下一个版本的内容的
|
|
||||||
之后几天基本上都会发布最新版本的内容的"""
|
|
||||||
|
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
from tkinter.scrolledtext import ScrolledText
|
|
||||||
import webbrowser
|
|
||||||
import os
|
|
||||||
import json
|
|
||||||
import requests
|
|
||||||
from tkinter import messagebox
|
|
||||||
|
|
||||||
root = Tk()
|
root = Tk()
|
||||||
ml = os.getcwd()
|
|
||||||
|
|
||||||
def quit_exe():
|
def quit_exe():
|
||||||
root.destroy()
|
root.destroy()
|
||||||
def update_now():
|
pass
|
||||||
webbrowser.open("https://kgithub.com/dengrb1/chatgpt/releases/")
|
|
||||||
messagebox.showinfo('update', '请选择最新版本并下载运行安装程序,然后就可以更新了!')
|
|
||||||
'''def downloads_update_now():
|
|
||||||
if os.path.exists(os.path.join(ml, "downloads_update_now.exe")):
|
|
||||||
os.startfile("downloads_update_now")
|
|
||||||
|
|
||||||
else:
|
|
||||||
messagebox.showerror(':( error','在线更新模块错误:文件不存在')
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
# Label
|
# Label
|
||||||
update_now_bt = Button(root ,text='在线更新', command=update_now).pack(side=RIGHT)
|
|
||||||
quit_bt = Button(root, text='返回', command=quit_exe).pack(side=RIGHT)
|
|
||||||
Label(root, text='更新日志').pack()
|
Label(root, text='更新日志').pack()
|
||||||
text = '''
|
Label(root, text='''0.1.0 DEMO制作完成
|
||||||
当前版本:1.3 (Not beta or demo)
|
|
||||||
|
|
||||||
|
|
||||||
1.3 加入aiyunos、free2gpt、chatkey网站;删除qdymys、extkj等网站;加入在程序内
|
|
||||||
访问官网,加入cmd版本的chatGPT(测试版);修复一些很明显的BUG
|
|
||||||
|
|
||||||
1.2 增加lbbai网站;修复BUG;完全移除“关于”模块......
|
|
||||||
|
|
||||||
1.1.1 更新chatGPT网站;修改update文本显示设置。新增bnu120聊天网站
|
|
||||||
1.1 修复BUG;紧急修复Windows7无法使用情况!;重新修正UI界面
|
|
||||||
|
|
||||||
1.0.1 修复BUG:移除“检查文件完整度”程序使用
|
|
||||||
1.0 加入关于模块,更新网站aitianhu.top;修复“退出”按钮
|
|
||||||
的问题
|
|
||||||
|
|
||||||
0.1.3 修复BUG
|
|
||||||
0.1.2 demo版本删除lbbAI网站,因为无法使用
|
|
||||||
0.1.1 demo版本增加lbbAI网站
|
0.1.1 demo版本增加lbbAI网站
|
||||||
0.1 DEMO制作完成
|
0.1.2 demo版本删除lbbAI网站,因为无法使用
|
||||||
'''
|
0.1.3 修复BUG
|
||||||
|
1.0 加入关于模块,更新网站aitianhu.top;修复“退出”按钮的问题;''').pack()
|
||||||
text_box = ScrolledText(root)
|
|
||||||
text_box.pack(fill=BOTH, expand=1)
|
|
||||||
text_box.insert(END, text)
|
|
||||||
text_box.configure(state='disabled')
|
|
||||||
|
|
||||||
|
Label(root, text='当前版本:1.0 (Not beta or demo)').pack()
|
||||||
|
|
||||||
# Button
|
# Button
|
||||||
quit_bt = Button(root, text='返回', command=quit_exe).pack()
|
quit_bt = Button(root, text='返回', command=quit_exe).pack()
|
||||||
update_now_bt = Button(root, text='在线更新', command=update_now).pack()
|
|
||||||
|
|
||||||
# mainloop
|
# mainloop
|
||||||
root.title('更新日志')
|
root.title('更新日志')
|
||||||
root.geometry('355x250+400+400')
|
root.geometry('260x250+400+400')
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
61
wifi_jc.py
61
wifi_jc.py
@@ -1,61 +0,0 @@
|
|||||||
import sys
|
|
||||||
import os
|
|
||||||
import urllib.request
|
|
||||||
import webbrowser
|
|
||||||
from time import sleep, strftime
|
|
||||||
|
|
||||||
|
|
||||||
ml = os.getcwd()
|
|
||||||
file_error = '文件丢失,请重新安装!!'
|
|
||||||
ok_file = int(0)
|
|
||||||
error_file = int(0)
|
|
||||||
ERROR_MSG = '错误:'
|
|
||||||
|
|
||||||
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
print(file_error)
|
|
||||||
sleep(1)
|
|
||||||
|
|
||||||
|
|
||||||
def check_internet(url='http://www.baidu.com/', timeout=5):
|
|
||||||
try:
|
|
||||||
urllib.request.urlopen(url, timeout=timeout)
|
|
||||||
open_exe('client')
|
|
||||||
return True
|
|
||||||
except Exception as e:
|
|
||||||
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: WIFI连接不正常,请检测wifi连接后再试吧')
|
|
||||||
sleep(5)
|
|
||||||
print('是否继续启动程序(Y.是,N.不是)?')
|
|
||||||
input_xz = str(input('>>>'))
|
|
||||||
if input_xz != None:
|
|
||||||
if input_xz.lower() == 'y':
|
|
||||||
open_exe('client')
|
|
||||||
elif input_xz.lower() == 'n':
|
|
||||||
sys.exit()
|
|
||||||
else:
|
|
||||||
print('请输入英文字母!!')
|
|
||||||
sleep(1.5)
|
|
||||||
else:
|
|
||||||
print('错误:没有输入文字')
|
|
||||||
sleep(1.5)
|
|
||||||
return False
|
|
||||||
|
|
||||||
'''def open_exe(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml,f"{exe_name}.exe")):
|
|
||||||
ok_file += 1
|
|
||||||
else:
|
|
||||||
error_file += 1
|
|
||||||
pass
|
|
||||||
|
|
||||||
def file_jc():
|
|
||||||
open_exe('bnu120')
|
|
||||||
open_exe('client')
|
|
||||||
open_exe('update')'''
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
if __name__ == '__main__':
|
|
||||||
check_internet()
|
|
||||||
73
xz_chat.pyw
73
xz_chat.pyw
@@ -1,73 +0,0 @@
|
|||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
import os
|
|
||||||
import webbrowser
|
|
||||||
|
|
||||||
# 定义内容和创建主窗口
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
ok = '安装成功'
|
|
||||||
install = 'pip install'
|
|
||||||
file_error = '文件丢失,请重新安装'
|
|
||||||
|
|
||||||
|
|
||||||
# 创建滚动区域的Canvas对象
|
|
||||||
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
|
||||||
|
|
||||||
# 创建可滚动区域的Frame对象,并将其添加到Canvas中
|
|
||||||
frame = Frame(canvas)
|
|
||||||
frame.bind("<Configure>", lambda e: canvas.configure(scrollregion=canvas.bbox("all")))
|
|
||||||
canvas.create_window((0, 0), window=frame, anchor="nw")
|
|
||||||
|
|
||||||
# 创建Scrollbar对象,并将其绑定到Canvas上
|
|
||||||
scrollbar = Scrollbar(root, orient="vertical", command=canvas.yview)
|
|
||||||
canvas.configure(yscrollcommand=scrollbar.set)
|
|
||||||
scrollbar.pack(side="right", fill="y")
|
|
||||||
|
|
||||||
# 显示Canvas和Scrollbar
|
|
||||||
canvas.pack(side="left", fill="both", expand=True)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Define functions
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
messagebox.showerror('system', file_error)
|
|
||||||
def aiyunos():
|
|
||||||
open_exe("aiyunos")
|
|
||||||
def wuguokai():
|
|
||||||
open_exe("wuguokai")
|
|
||||||
def chatkey():
|
|
||||||
open_exe("chatkey")
|
|
||||||
def bnu120():
|
|
||||||
open_exe('bnu120')
|
|
||||||
def free2gpt():
|
|
||||||
open_exe('free2gpt')
|
|
||||||
def fh():
|
|
||||||
root.destroy()
|
|
||||||
|
|
||||||
|
|
||||||
# Button
|
|
||||||
bt_wuguokai = Button(frame, text='wuguokai网站', command=wuguokai)
|
|
||||||
bt_aiyunos = Button(frame, text='aiyunos网站', command=aiyunos)
|
|
||||||
bt_chatkey = Button(frame, text='chatkey网站', command=chatkey)
|
|
||||||
bt_free2gpt = Button(frame, text='free2gpt网站', command=free2gpt)
|
|
||||||
bt_bnu120 = Button(frame, text='bnu120网站', command=bnu120)
|
|
||||||
bt_fh = Button(frame, text='返回', command=fh)
|
|
||||||
|
|
||||||
# pack and Label
|
|
||||||
Label(root, text='选择界面').pack()
|
|
||||||
bt_wuguokai.pack()
|
|
||||||
bt_aiyunos.pack()
|
|
||||||
bt_free2gpt.pack()
|
|
||||||
bt_chatkey.pack()
|
|
||||||
bt_bnu120.pack()
|
|
||||||
bt_fh.pack()
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
root.title('chatWEB')
|
|
||||||
root.geometry('200x220+440+600')
|
|
||||||
root.mainloop()
|
|
||||||
36
xz_main.pyw
36
xz_main.pyw
@@ -1,36 +0,0 @@
|
|||||||
import os
|
|
||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
from time import time
|
|
||||||
import sys
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml,f"{exe_name}.exe")):
|
|
||||||
os.system(f'start {exe_name}.exe')
|
|
||||||
else:
|
|
||||||
messagebox.showerror('system','文件丢失!')
|
|
||||||
pass
|
|
||||||
|
|
||||||
def chat():
|
|
||||||
open_exe("xz_chat")
|
|
||||||
|
|
||||||
def quit_exe():
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
# Button
|
|
||||||
chat_b = Button(root ,text='聊天网站', command=chat)
|
|
||||||
q_b = Button(root ,text='返回', command= quit_exe)
|
|
||||||
|
|
||||||
# pack Button and label
|
|
||||||
Label(root, text='选择模式').pack()
|
|
||||||
chat_b.pack()
|
|
||||||
q_b.pack()
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
root.title('chatWEB')
|
|
||||||
root.geometry('200x220')
|
|
||||||
root.mainloop()
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
import sys
|
|
||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
import os
|
|
||||||
import requests
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
file_path = os.path.join(ml, "api_key.txt")
|
|
||||||
|
|
||||||
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml ,f"{exe_name}.exe")):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
messagebox.showerror('chatGPT','错误:命令行文件不存在!')
|
|
||||||
pass
|
|
||||||
def chat_command():
|
|
||||||
API_key = entry_APIkey.get()
|
|
||||||
if API_key != None:
|
|
||||||
with open(file_path,'w') as f:
|
|
||||||
f.write(API_key)
|
|
||||||
pass
|
|
||||||
open_exe('chat_command')
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
messagebox.showerror('错误','API_key不存在!无法使用!')
|
|
||||||
|
|
||||||
def fh():
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
# Button
|
|
||||||
run_command = Button(root, text='chatGPT启动', command=chat_command)
|
|
||||||
fh_bt = Button(root, text='返回', command=fh)
|
|
||||||
|
|
||||||
# entry
|
|
||||||
entry_APIkey = Entry(root)
|
|
||||||
|
|
||||||
# grid
|
|
||||||
Label(root, text='api_key:').grid(row=0,column=0)
|
|
||||||
entry_APIkey.grid(row=0, column=1)
|
|
||||||
run_command.grid(row=2,column=0)
|
|
||||||
fh_bt.grid(row=2,column=1)
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
root.title('chatGPT')
|
|
||||||
root.geometry('200x250+100+100')
|
|
||||||
root.mainloop()
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
import sys
|
|
||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
import os
|
|
||||||
import requests
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
file_path = os.path.join(ml, "api_key.txt")
|
|
||||||
|
|
||||||
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml ,f"{exe_name}.exe")):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
messagebox.showerror('chatGPT','错误:命令行文件不存在!')
|
|
||||||
pass
|
|
||||||
def chat_command():
|
|
||||||
API_key = entry_APIkey.get()
|
|
||||||
if API_key != None:
|
|
||||||
with open(file_path,'w') as f:
|
|
||||||
f.write(API_key)
|
|
||||||
pass
|
|
||||||
open_exe('chat_command')
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
messagebox.showerror('错误','API_key不存在!无法使用!')
|
|
||||||
|
|
||||||
def fh():
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
# Button
|
|
||||||
run_command = Button(root, text='chatGPT启动', command=chat_command)
|
|
||||||
fh_bt = Button(root, text='返回', command=fh)
|
|
||||||
|
|
||||||
# entry
|
|
||||||
entry_APIkey = Entry(root)
|
|
||||||
|
|
||||||
# grid
|
|
||||||
Label(root, text='api_key:').grid(row=0,column=0)
|
|
||||||
entry_APIkey.grid(row=0, column=1)
|
|
||||||
run_command.grid(row=2,column=0)
|
|
||||||
fh_bt.grid(row=2,column=1)
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
root.title('chatWEB')
|
|
||||||
root.geometry('200x250+100+100')
|
|
||||||
root.mainloop()
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import os
|
|
||||||
import webbrowser
|
|
||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
|
|
||||||
|
|
||||||
def jc(exe_name):
|
|
||||||
if os.path.exists(os.path.join(ml,f"{exe_name}.exe")):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
messagebox.showerror("sittings", '系统文件丢失!请重新安装')
|
|
||||||
pass
|
|
||||||
pass
|
|
||||||
|
|
||||||
def gk():
|
|
||||||
jc('gk')
|
|
||||||
|
|
||||||
def update():
|
|
||||||
jc("update")
|
|
||||||
|
|
||||||
def fh():
|
|
||||||
root.destroy()
|
|
||||||
|
|
||||||
|
|
||||||
# Button, Label and pack
|
|
||||||
Label(root, text='其他内容').pack()
|
|
||||||
bt_update = Button(root, text='更新日志', command=update).pack()
|
|
||||||
bt_gk = Button(root, text='关于', command=gk).pack()
|
|
||||||
bt_fh = Button(root, text='返回', command=fh).pack()
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
root.title("其他")
|
|
||||||
root.geometry("200x200+400+400")
|
|
||||||
root.mainloop()
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import sys
|
|
||||||
from PyQt5.QtCore import QUrl
|
|
||||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction
|
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|
||||||
|
|
||||||
class Browser(QMainWindow):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.setWindowTitle('浏览器')
|
|
||||||
|
|
||||||
self.browser = QWebEngineView()
|
|
||||||
self.browser.setUrl(QUrl('https://home.xjai.cc'))
|
|
||||||
self.setCentralWidget(self.browser)
|
|
||||||
|
|
||||||
refresh_button = QAction('刷新', self)
|
|
||||||
refresh_button.triggered.connect(self.browser.reload)
|
|
||||||
self.toolbar = self.addToolBar('Refresh')
|
|
||||||
self.toolbar.addAction(refresh_button)
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
browser = Browser()
|
|
||||||
browser.showMaximized()
|
|
||||||
sys.exit(app.exec_())
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
import os
|
|
||||||
import webbrowser
|
|
||||||
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
|
|
||||||
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if exe_name == None:
|
|
||||||
messagebox.showerror('chatWEB', '程序错误:没有参数')
|
|
||||||
if os.path.exists(ml, f"{exe_name}.exe"):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
messagebox.showerror("ChatWEB", '重要文件丢失,请重新安装')
|
|
||||||
pass
|
|
||||||
def chat2doc():
|
|
||||||
webbrowser.open("https://chat2doc.cn")
|
|
||||||
pass
|
|
||||||
def fh():
|
|
||||||
root.destroy()
|
|
||||||
|
|
||||||
|
|
||||||
# Button
|
|
||||||
chat2doc_bt = Button(root, text='chat2doc网站', command=chat2doc)
|
|
||||||
fh_bt = Button(root, text='返回', command=fh)
|
|
||||||
|
|
||||||
# pack
|
|
||||||
Label(root, text='选择').pack()
|
|
||||||
chat2doc_bt.pack()
|
|
||||||
fh_bt.pack()
|
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
|
||||||
root.title('选择')
|
|
||||||
root.geometry('200x200+700+400')
|
|
||||||
root.mainloop()
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
from tkinter import *
|
|
||||||
from tkinter import messagebox
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
root = Tk()
|
|
||||||
ml = os.getcwd()
|
|
||||||
|
|
||||||
|
|
||||||
def open_exe(exe_name):
|
|
||||||
if exe_name == None:
|
|
||||||
messagebox.showerror('程序错误:没有参数')
|
|
||||||
pass
|
|
||||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
|
||||||
os.system(f"start {exe_name}.exe")
|
|
||||||
else:
|
|
||||||
messagebox.showerror('chatWEB', '重要文件丢失,请重新安装')
|
|
||||||
pass
|
|
||||||
Reference in New Issue
Block a user