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

定义一个重启函数

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

 

分类:

技术点:

相关文章:

  • 2022-01-03
  • 2021-06-08
  • 2021-11-03
  • 2021-09-08
  • 2021-11-22
  • 2022-01-31
  • 2022-02-28
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2021-12-15
  • 2022-12-23
  • 2021-08-07
  • 2022-01-09
  • 2022-02-03
  • 2022-01-05
相关资源
相似解决方案