mrfri
#重启程序
def restart_program():
  python = sys.executable
  os.execl(python, python, * sys.argv)

定义一个重启函数

#主程序
print(\'restart...\')
            restart_program()

 

分类:

技术点:

相关文章: