#重启程序 def restart_program(): python = sys.executable os.execl(python, python, * sys.argv)
定义一个重启函数
#主程序 print('restart...') restart_program()
#重启程序 def restart_program(): python = sys.executable os.execl(python, python, * sys.argv)
定义一个重启函数
#主程序 print('restart...') restart_program()
转载于:https://www.cnblogs.com/mrfri/p/8558306.html