【发布时间】:2019-04-30 02:30:23
【问题描述】:
如何从 python 运行 .exe,等待 .exe 完成执行,然后关闭 .exe 开始执行时打开的命令提示符。所以基本上最后我试图关闭之前打开的 .exe 文件,但只有在它完成执行之后。
os.system('C:/mybackup/imageautomation/Etl.PrepareAttachments.exe')
'''I want the above exe to run and after completion close itself and
then run the exe in the below command'''
os.system('C:/mybackup/imageautomation/Etl.UploadAttachments.exe')
【问题讨论】:
-
os.system('C:/mybackup/imageautomation/Etl.PrepareAttachments.exe') 这会运行 exe,但一旦完成就不会关闭它。我必须手动关闭运行 exe 的命令提示符。
-
如果你知道
os.system那么,你为什么不试试os.system('exit') -
@vaku 我想在第一个 exe 完成后运行另一个 exe。
-
那么你想什么时候退出...
标签: python