我有一个基于Python的GTK应用程序,它加载了几个模块。它是这样从(linux)终端运行的。
./myscript.py --some-flag setting
在程序中,用户可以下载(使用Git)更新的版本。
如果这些版本存在/被下载,就会出现一个按钮,我希望它能用新编译的内容(包括依赖/进口)重新启动程序。最好还能用
sys.argv
的内容重新启动,以保持所有的标志。
因此,我没有找到/需要的是一个漂亮的重启程序,它可以杀死程序的当前实例,并使用相同的参数启动新的程序。
最好是解决方案也能在Windows和Mac上运行,但这并不是必须的。