python 程序重启的代码

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38002337/article/details/79831486
    # 重启程序
    def restart_program():
        print("重启。。。。。。。")
        python = sys.executable   
        os.execl(python, python, * sys.argv) 

猜你喜欢

转载自blog.csdn.net/qq_38002337/article/details/79831486