不需要清理这个位置  第二个进度条出现的时候 清空如图所示区域   为什么无法清理为什么用交互式命令后inquirer向清理之前的,却无法清理 import importlib import inquirer from crontabs import Crontab if __name__ == '__main__': # Tasks.four_screen() # result_dataframe = pd.read_excel(f'assets{os.sep}旗舰店链接汇总.xlsx').merge( # pd.read_csv(os.path.join('cache', 'sales_data.csv')), on='店铺') # data = result_dataframe[result_dataframe['业绩归属'] != '其他'][ # ['业绩归属', '昨日销售量', '昨日销售额', '本月销售量', '本月销售额', '销量目标', '销售额目标']] # print(data) # result_dataframe.to_csv('aaa.csv') # exit(0) crawler_type = [ inquirer.List( "crawler", message="请选择工具", choices=["semrush", '网站截图工具', '商品价格监控', '领星业绩统计', '亚马逊', '定时任务', '更新驱动', # '版本更新' ], ), ] try: crawler_name = inquirer.prompt(crawler_type)['crawler'] if crawler_name == 'semrush': module = importlib.import_module("crawler.semrush.main") module.control_panel() elif crawler_name == '更新驱动': from foundation.selenium.update_chrome_driver import download download() elif crawler_name == '商品价格监控': from crawler.price_monitor import run run() elif crawler_name == '领星业绩统计': from office.lingxing import performance elif crawler_name == '定时任务': print("\r", end='', flush=True) Crontab().control_panel() elif crawler_name == '亚马逊': pass except TypeError: pass import time import inquirer from apscheduler.schedulers.background import BackgroundScheduler from crontabs.Tasks import Tasks from concurrent.futures import ThreadPoolExecutor def test(): Tasks.four_screen() executor = ThreadPoolExecutor(max_workers=5) # 这里设置最大工作线程数为 5,可以根据需求进行调整 scheduler = BackgroundScheduler(executor=executor) scheduler.add_job(Tasks.ling_xing_order_and_listing, 'cron', name="每小时运行领星订单和listing", hour='1-23', minute='0', second='0') scheduler.add_job(Tasks.four_screen, 'cron', name="领星截屏", day_of_week='1-5', hour='8,13,17', minute='0', second='0') scheduler.add_job(Tasks.dingding, 'cron', name="业绩推送", args=[], month='*', day='*', hour='5') scheduler.add_job(test, 'interval', seconds=1,max_instances=1) class Crontab: @staticmethod def control_panel(): menu = inquirer.prompt([ inquirer.List( 'menu', message="执行什么操作?", choices=["开始运行", "查看列表"], ), ])['menu'] if menu == "开始运行": try: scheduler.start() while True: pass except (KeyboardInterrupt, SystemExit): # 在接收到 KeyboardInterrupt 或 SystemExit 信号时,关闭调度器 scheduler.shutdown() if menu == "查看列表": scheduler.print_jobs()