From d516496935a71c36e0a62dc67f9f2fd3838becbb Mon Sep 17 00:00:00 2001 From: dengrb1 <125752069+dengrb1@users.noreply.github.com> Date: Wed, 10 May 2023 17:44:39 +0800 Subject: [PATCH] python_jc --- python_jc.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 python_jc.py diff --git a/python_jc.py b/python_jc.py new file mode 100644 index 0000000..332f79f --- /dev/null +++ b/python_jc.py @@ -0,0 +1,29 @@ +import sys +import os +from time import sleep + + +ml = os.getcwd() +file_error = '文件丢失,请重新安装!!' + + +# def +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) + pass + + +# try +try: + import pip + print('pip已经安装!!') + sleep(0.5) + open_exe('client') +except ImportError: + print("请安装Pip或者python") + sleep(2) + sys.exit() \ No newline at end of file