import threading
import pyautogui
from ctypes import *
import time
import os, sys
import pyperclip
import inspect
import ctypes
import _thread
def _async_raise(tid, exctype):
"""raises the exception, performs cleanup if needed"""
tid = ctypes.c_long(tid)
if not inspect.isclass(exctype):
exctype = type(exctype)
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype))
if res == 0:
raise ValueError("invalid thread id")
elif res != 1:
# """if it returns a number greater than one, you're in trouble,
# and you should call it again with exc=NULL to revert the effect"""
ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None)
raise SystemError("PyThreadState_SetAsyncExc failed")
def stop_thread(threa):
_async_raise(threa.ident, SystemExit)
def get_caozuo_name():
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
files1 = []
file_dir = r"{}".format(os.path.realpath(sys.argv[0])[:-13])
for root, dirs, files in os.walk(file_dir, topdown=False):
files = files[:-1]
for i in files:
if '.txt' in i:
files1.append(i[:-4])
return files1
def get_caozuokuai_name():
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
files1 = []
file_dir = r"{}".format(os.path.realpath(sys.argv[0])[:-13])
for root, dirs, files in os.walk(file_dir, topdown=False):
files = files[:-1]
for i in files:
if '逻辑块存储.txt' in i:
files1.append(i[:-9])
return files1
def writeList2txt(file, data):
'''
将list写入txt
:param data:
:return:
'''
file.write(str(data), encoding='uft8')
def readListFromStr(str):
'''
str -> List
除去冗余的方法调用
:param str:
:return:
'''
res, pos = help(str, 1)
res1 = []
a = '1'
for ii in res:
iii = []
for i in ii:
if type(i) == type(a):
i = i.replace("'", "")
iii.append(i)
else:
iii.append(i)
res1.append(iii)
return res1
def help(str, startIndex):
'''
单行字符串的读取,形成list
:param str:
:return:
'''
str = str.replace(" ", "") # 将所有空格删去
res = []
i = startIndex
pre = startIndex
while i < len(str):
if str[i] == '[':
# 将pre-i-2的字符都切片,切split
if i - 2 >= pre:
slice = str[pre:i - 1].split(',')
for element in slice:
res.append(element)
# 递归调用 加入子list
child, pos = help(str, i + 1)
res.append(child)
i = pos # i移动到pos位置,也就是递归的最后一个右括号
pre = pos + 2 # 右括号之后是, [ 有三个字符,所以要+2至少
elif str[i] == ']':
# 将前面的全部放入列表
if i - 1 >= pre:
slice = str[pre:i].split(',')
for element in slice:
res.append(element)
return res, i
i = i + 1
return res, i
def get_caozuo(caozuopath):
with open(caozuopath, 'r', encoding='utf8') as f:
data = f.read()
return data
def get_xy():
x, y = pyautogui.position()
return [x, y]
def GetColor(xy):
x = xy[0]
y = xy[1]
r = 0
g = 0
b = 0
try:
gdi32 = windll.gdi32
user32 = windll.user32
hdc = user32.GetDC(None) # 获取颜色值
pixel = gdi32.GetPixel(hdc, x, y) # 提取RGB值
r = pixel & 0x0000ff
g = (pixel & 0x00ff00) >> 8
b = pixel >> 16
except KeyboardInterrupt:
print(' ')
return [r, g, b]
def timer(timex):
time.sleep(timex)
def clicker_cishu(cishu, x, y, pinlv):
for a in range(cishu):
pyautogui.click(x, y)
time.sleep(pinlv)
def clicker_time(shijian, x, y, pinlv):
start = time.time()
while True:
pyautogui.click(x, y)
time.sleep(pinlv)
end = time.time()
shijian1 = end - start
if shijian1 >= shijian:
break
def zhixing(step):
for i in step:
if i[0] == '点击':
x = int(i[1][0])
y = int(i[1][1])
pyautogui.click(x, y)
print(f'已执行完点击动作,点击坐标位置:X:{x},Y:{y} ')
if i[0] == '延时':
t = int(i[1])
timer(t)
print(f'已执行完延时动作,延时时长:{t}秒')
if i[0] == '连点':
if i[2] == '连点次数':
clicker_cishu(int(i[3]), int(i[1][0]), int(i[1][1]), int(i[4]))
print(f'已执行完连点操作,你选择的是{i[2]},连点次数是{i[4]}')
if i[2] == '连点时长':
clicker_time(int(i[3]), int(i[1][0]), int(i[1][1]), int(i[4]))
print(f'已执行完连点操作,你选择的是{i[2]},连点时长是{i[4]}秒')
if i[0] == '拖拽':
pyautogui.moveTo(int(i[1][0]), int(i[1][1]))
pyautogui.dragTo(int(i[2][0]), int(i[2][1]), 1, button='left')
print(f'已执行拖拽动作,拖拽起始位置是X:{int(i[1][0])},Y:{int(i[1][1])},拖拽后的位置是X:{int(i[2][0])},Y:{int(i[2][1])}')
if i[0] == '双击':
pyautogui.click(int(i[1][0]), int(i[1][1]))
pyautogui.click(int(i[1][0]), int(i[1][1]))
print(f'已执行完点击动作,点击坐标位置:X:{int(i[1][0])},Y:{int(i[1][1])} ')
if i[0] == '输入':
pyautogui.click(int(i[1][0]), int(i[1][1]))
pyperclip.copy(i[2])
time.sleep(0.1)
pyautogui.hotkey('ctrl', 'v')
if i[0] == '按键':
pyautogui.hotkey(*i[1])
if i[0] == '右击':
x = int(i[1][0])
y = int(i[1][1])
pyautogui.rightClick(x, y)
print(f'已执行完右击动作,点击坐标位置:X:{x},Y:{y} ')
if i[0] == '中击':
x = int(i[1][0])
y = int(i[1][1])
pyautogui.middleClick(x, y)
print(f'已执行完中击动作,点击坐标位置:X:{x},Y:{y} ')
if i[0] == '滚动':
import pywinauto.mouse
x, y = pyautogui.position()
pywinauto.mouse.scroll((x, y), i[1]) # (1100,300)是初始坐标,1000是滑动距离(可负)
def cunchu():
yorn = input("执行完毕,是否保存? 输入'yes'or'no' ")
while 1:
if yorn == 'yes':
if len(step) == 0:
print('还未记录你任何操作,请添加操作再使用存储功能')
else:
do_name = input('请为以上操作命名吧:')
path = r"{}.txt".format(do_name)
listtotxt(list=step, path=path)
break
if yorn == 'no':
print('你已取消存储')
break
else:
yorn = input("请输入'yes'or'no': ")
def chakan():
if len(step) == 0:
print('暂未录入操作,请先录入操作再查看')
zizeng = 1
for i in step:
if i[0] == '点击':
x = int(i[1][0])
y = int(i[1][1])
print(f'第{zizeng}步: 执行点击动作,点击坐标位置:X:{x},Y:{y} ')
if i[0] == '延时':
t = int(i[1])
print(f'第{zizeng}步: 执行延时动作,延时时长:{t}秒')
if i[0] == '连点':
if i[2] == '连点次数':
print(f'第{zizeng}步: 执行连点操作,你选择的是{i[2]},连点次数是{i[4]}')
if i[2] == '连点时长':
print(f'第{zizeng}步: 执行连点操作,你选择的是{i[2]},连点时长是{i[4]}秒')
if i[0] == '拖拽':
print(
f'第{zizeng}步: 执行拖拽动作,拖拽起始位置是X:{int(i[1][0])},Y:{int(i[1][1])},拖拽后的位置是X:{int(i[2][0])},Y:{int(i[2][1])}')
if i[0] == '双击':
print(f'第{zizeng}步: 执行点击动作,点击坐标位置:X:{int(i[1][0])},Y:{int(i[1][1])} ')
if i[0] == '按键':
print(f'第{zizeng}步: 执行按键动作,将同时按下”{i[1]}“键')
zizeng += 1
def daoru():
caozuojiyi = get_caozuo_name()
while True:
xunhuan_choose = input('已存储的操作有:{} 请输入导入操作的操作名:'.format(caozuojiyi))
if xunhuan_choose in caozuojiyi:
break
else:
print('存储库中并无你想要的操作,请重新输入:')
caozuopath = r'{}.txt'.format(xunhuan_choose)
step1 = txttolist(caozuopath)
print(step1)
return [step1, xunhuan_choose]
def jianshi():
global state, rgb, rgb_xy, xiancheng
while 1:
aa = GetColor(rgb_xy)
if aa == rgb:
try:
stop_thread(xiancheng)
finally:
state = '触发'
print(f'检测到{rgb_xy}位置的RGB值变为{aa}')
break
def zhixingbuzhoukuai(buzhou, bu, xunhuanyn):
global state
print(f'正在执行"{buzhou}"代码块的操作')
state = '未触发'
if bu == '1':
while 1:
if state == '触发':
break
if state == '未触发':
timer(0.1)
elif xunhuanyn == '循环':
while 1:
if state == '触发':
break
if state == '未触发':
zhixing(bu)
elif xunhuanyn == '不循环':
zhixing(bu)
def listtotxt(list, path):
import json
c_list = list
c_list = json.dumps(c_list)
'''将c_list存入文件
'''
a = open(path, "w", encoding='UTF-8')
a.write(c_list)
a.close()
print('已存入txt')
def txttolist(path):
import json
b = open(path, "r", encoding='UTF-8')
out = b.read()
out = json.loads(out)
return out
rgb_xy = []
rgb = []
state = '未触发'
panduans = []
step = []
while True:
choose = input('请输入你需要使用的功能:')
if choose == '点击':
click = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
click.append('点击')
click.append(click_weizhi)
step.append(click)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
if choose == '延时':
while 1:
timerr = []
try:
timex = int(input('请输入延时时间:'))
timerr.append('延时')
timerr.append(timex)
step.append(timerr)
break
except:
print('延时失败/n请输入正确的延时时间')
continue
if choose == '连点':
click_liandian = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
click_liandian.append('连点')
click_liandian.append(click_weizhi)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
click_pinlv = float(input('请输入连点频率:'))
while 1:
click_stop_choose = input('“连点次数”or“连点时长”')
if click_stop_choose == '连点次数':
click_cishu = int(input('请输入连点次数:'))
click_liandian.append('连点次数')
click_liandian.append(click_cishu)
click_liandian.append(click_pinlv)
step.append(click_liandian)
print(click_liandian)
print(step)
break
if click_stop_choose == '连点时长':
click_shichang = int(input('请输入连点时长(秒):'))
click_liandian.append('连点时长')
click_liandian.append(click_shichang)
step.append(click_liandian)
click_liandian.append(click_pinlv)
print(click_liandian)
print(step)
break
else:
continue
if choose == '存储':
if len(step) == 0:
print('还未记录你任何操作,请添加操作再使用存储功能')
else:
do_name = input('请为以上操作命名吧:')
path = r"{}.txt".format(do_name)
listtotxt(list=step, path=path)
if choose == '拖拽':
tuozhuai = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成移动前的位置输入,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
tuozhuai.append('拖拽')
tuozhuai.append(click_weizhi)
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成移动后的位置输入,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
tuozhuai.append(click_weizhi)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
step.append(tuozhuai)
if choose == '循环执行':
while 1:
xunhuan_cishu_zhixing = 0
xunhuan_cishu = input('请输入循环次数(如要无限循环请输入"无限"):')
if xunhuan_cishu == '无限':
while True:
zhixing(step)
if xunhuan_cishu.isdigit():
for i in range(int(xunhuan_cishu)):
xunhuan_cishu_zhixing += 1
zhixing(step)
print(f'已完成{xunhuan_cishu_zhixing}次循环')
break
else:
print('你的输入有误,请重新输入:')
if choose == '导入':
if len(step) == 0:
step = daoru()[0]
else:
baocun_choose = input('此次操作若未保存请先,导入别的操作会覆盖原来的操作,你确定要导入吗? 请输入“yes”or“no”: ')
while 1:
if baocun_choose == 'no':
break
if baocun_choose == 'yes':
print('你已取消保存')
step = daoru()[0]
break
else:
yorn = input("请输入'yes'or'no': ")
if choose == '输入':
shuru = []
while 1:
click_dongzuo = input('请移动鼠标到你要输入的位置上输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
txt_in = input('请输入你要在该位置输入的文字: ')
shuru.append('输入')
shuru.append(click_weizhi)
shuru.append(txt_in)
step.append(shuru)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
if choose == '按键':
while 1:
anjian = input('这是模拟操作键盘的操作(例如复制,输入'ctrl‘ + 'c‘): ')
if anjian != 'q':
anjian = anjian.split('+')
anjians = []
a = []
for an in anjian:
an = an.replace("‘", "").replace("'", "").strip()
if an in pyautogui.KEYBOARD_KEYS:
anjians.append(an)
nihaofan = 0
else:
print('你的输入不合法')
nihaofan = 1
break
if nihaofan == 0:
a.append('按键')
a.append(anjians)
step.append(a)
print('录入成功')
break
if anjian == 'q':
break
if choose == '双击':
click_double = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
click_double.append('双击')
click_double.append(click_weizhi)
step.append(click_double)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
if choose == '滚动':
while 1:
gundong = []
try:
gundong1 = int(input('这里是模拟鼠标滚动,请输入你要滚动距离(正数为向上移动,负数为向下移动): '))
gundong.append('滚动')
gundong.append(gundong1)
step.append(gundong)
break
except:
print('你的输入有误,请重新输入')
if choose == '查看':
chakan()
if choose == '右击':
click_r = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
click_r.append('右击')
click_r.append(click_weizhi)
step.append(click_r)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
if choose == '中击':
click_m = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
click_weizhi = get_xy()
click_m.append('中击')
click_m.append(click_weizhi)
step.append(click_m)
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”')
if choose == '执行':
if len(step) == 0:
print('你还未记录任何操作,请至少记录了一个操作再执行')
else:
zhixing(step)
cunchu()
if choose == '判断':
if len(panduans) == 0:
tuichu = 0
panduan = input('此功能的实现是基于颜色的RBG值来判断程序所要要执行的步骤块。 现在,请选择你的‘先执行步骤块等待条件触发'或是‘直接等待条件触发'的操作:(输入"步骤块"或"等待") ')
if panduan == '如果':
panduan_if = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上吸取颜色,输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
xy = get_xy()
click_color = GetColor(xy)
panduan_yn = input(f'这个位置的RGB为:{click_color},是否确定为下一步骤块的判断根据?(输入"yes"or"no") ')
while 1:
if panduan_yn == 'yes':
get_caozuo_name()
print(f'请选择满足当颜色为{click_color}时要执行的步骤包:')
steps, steps_name = daoru()
xunhuan_yn = input('这个步骤块是否循环执行至下一条件触发?(输入"yes"or"no") ')
while 1:
if xunhuan_yn == 'yes':
panduan_if.append('如果')
panduan_if.append(xy)
panduan_if.append(click_color)
panduan_if.append(steps_name)
panduan_if.append('循环')
panduan_if.append(steps)
panduans.append(panduan_if)
print('添加成功,该步骤包将会循环')
break
elif xunhuan_yn == 'no':
panduan_if.append('如果')
panduan_if.append(xy)
panduan_if.append(click_color)
panduan_if.append(steps_name)
panduan_if.append('不循环')
panduan_if.append(steps)
panduans.append(panduan_if)
print('添加成功,该步骤包将只执行一次')
break
else:
xunhuan_yn = input('你的输入有误,请输入"yes"or"no":')
tuichu = 1
break
if panduan_yn == 'no':
print('请重新选择')
break
else:
panduan_yn = input('你的输入有误,请输入"yes"or"no"')
if tuichu == 1:
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”)')
if panduan == '步骤块':
panduan_step = []
steps, steps_name = daoru()
xunhuan_yn = input('这个步骤块是否循环执行直至条件触发?(输入"yes"or"no") ')
while 1:
if xunhuan_yn == 'yes':
panduan_step.append('步骤块')
panduan_step.append('循环')
panduan_step.append(steps_name)
panduan_step.append(steps)
panduans.append(panduan_step)
break
elif xunhuan_yn == 'no':
panduan_step.append('步骤块')
panduan_step.append('不循环')
panduan_step.append(steps_name)
panduan_step.append(steps)
panduans.append(panduan_step)
break
else:
xunhuan_yn = input('你的输入有误,请输入"yes"or"no":')
if panduan == '等待':
panduan_if = []
print('你选择了等待,程序将时刻检测目标位置的颜色以执行接下来的步骤块')
panduan_if.append('等待')
panduans.append(panduan_if)
if panduan != '步骤块' and panduan != '如果' and panduan != '等待':
print('你的输入有误')
if len(panduans) > 0:
print('你一录入了至少一个逻辑判断,请选择继续选择目标位置的颜色来触发接下来你选择的步骤块')
panduan_if = []
while 1:
click_dongzuo = input('请移动鼠标到目标位置上吸取颜色,输入“1”完成动作,输入“0”取消动作')
if click_dongzuo == '1':
xy = get_xy()
click_color = GetColor(xy)
panduan_yn = input(f'这个位置的RGB为:{click_color},是否确定为下一步骤块的判断根据?(输入"yes"or"no") ')
while 1:
if panduan_yn == 'yes':
get_caozuo_name()
print(f'请选择满足当颜色为{click_color}时要执行的步骤包:')
steps, steps_name = daoru()
xunhuan_yn = input('这个步骤块是否循环执行直至条件触发?(输入"yes"or"no") ')
while 1:
if xunhuan_yn == 'yes':
panduan_if.append('如果')
panduan_if.append(xy)
panduan_if.append(click_color)
panduan_if.append(steps_name)
panduan_if.append('循环')
panduan_if.append(steps)
panduans.append(panduan_if)
print('添加成功,该步骤包将会循环')
break
elif xunhuan_yn == 'no':
panduan_if.append('如果')
panduan_if.append(xy)
panduan_if.append(click_color)
panduan_if.append(steps_name)
panduan_if.append('不循环')
panduan_if.append(steps)
panduans.append(panduan_if)
print('添加成功,该步骤包将只执行一次')
break
else:
xunhuan_yn = input('你的输入有误,请输入"yes"or"no":')
tuichu = 1
break
if panduan_yn == 'no':
print('请重新选择')
break
else:
panduan_yn = input('你的输入有误,请输入"yes"or"no"')
if tuichu == 1:
break
elif click_dongzuo == '0':
print('操作已取消')
break
else:
print('请输入正确的操作(输入“0”或“1”)')
if choose == '逻辑执行':
print('这里是逻辑执行库,所有的逻辑判断都会存储到这里')
print(panduans)
xiancheng = threading.Thread(target=zhixingbuzhoukuai, args=('等待', '1', '循环'))
xiancheng.setDaemon(True)
xiancheng.start()
for pan in panduans:
state = '未触发'
if pan[0] == '如果':
print(pan[5])
print(len(pan[5]))
bu = str(pan[5])
print(bu)
bu = readListFromStr(bu)
zhixing(bu)
print(bu)
if state == '未触发':
if pan[4] == '循环':
rgb = pan[2]
rgb_xy = pan[1]
_thread.start_new_thread(jianshi, ())
while 1:
if state == '触发':
xiancheng = threading.Thread(target=zhixingbuzhoukuai, args=(pan[3], pan[5], '循环'))
xiancheng.start()
state = '未触发'
break
if pan[4] == '不循环':
rgb = pan[2]
rgb_xy = pan[1]
_thread.start_new_thread(jianshi, ())
while 1:
if state == '触发':
xiancheng = threading.Thread(target=zhixingbuzhoukuai, args=(pan[3], pan[5], '不循环'))
xiancheng.start()
state = '未触发'
break
if pan[0] == '步骤块':
stop_thread(xiancheng)
if pan[1] == '循环':
xiancheng = threading.Thread(target=zhixingbuzhoukuai, args=(pan[2], pan[3], '循环'))
xiancheng.start()
if pan[1] == '不循环':
xiancheng = threading.Thread(target=zhixingbuzhoukuai, args=(pan[2], pan[3], '不循环'))
xiancheng.start()
if pan[0] == '等待':
print('程序正在监测目标位置RGB值')
print('逻辑执行已全部执行完毕')
break
if choose == '逻辑块存储':
yorn = input("确定保存? 输入'yes'or'no' ")
while 1:
if yorn == 'yes':
if len(panduans) == 0:
print('还未记录你任何操作,请添加操作再使用逻辑块存储功能')
else:
do_name = input('请为以上操作命名吧:')
if '逻辑块存储' in do_name:
do_name = input('抱歉,你的命名里不允许包含”逻辑块存储“,请重新命名')
else:
path = r"{}逻辑块存储.txt".format(do_name)
listtotxt(list=panduans, path=path)
break
if yorn == 'no':
print('你已取消存储')
break
else:
yorn = input("请输入'yes'or'no': ")
if choose == '逻辑块导入':
caozuojiyi = get_caozuokuai_name()
while True:
xunhuan_choose = input('已存储的操作有:{} 请输入导入操作的操作名:'.format(caozuojiyi))
if xunhuan_choose in caozuojiyi:
break
else:
print('逻辑块存储库中并无你想要的操作,请重新输入:')
caozuopath = r"{}逻辑块存储.txt".format(xunhuan_choose)
panduans = txttolist(path=caozuopath)
if choose == 'q' or choose == 'quit' or choose == '退出' or choose == 'close':
break
if choose == 'tips' or choose == '提示' or choose == 'help' or choose == '帮助':
print(
'''你可以输入'点击', '右击', '中击', '逻辑执行', '判断', '滚动', '延时', '存储', '执行', '循环执行', '拖拽', '连点', '输入', '双击', '查看',
'导入', 'q', 'quit','退出', 'close', 'tips', '提示', 'help', '帮助', '按键'来帮助你完成你的自动化操作''')
if not choose in ['点击', '右击', '中击', '逻辑执行', '判断', '滚动', '延时', '存储', '执行', '循环执行', '拖拽', '连点', '输入', '双击', '查看',
'导入', 'q', 'quit','退出', 'close', 'tips', '提示', 'help', '帮助', '按键']:
print('你的输入有误或暂未开发此功能,请重新输入(输入”help“获得提示)')
print('代码已全部执行完毕,程序已退出')
|