How to run external executable using Python?

后端 未结 4 1277
情话喂你
情话喂你 2020-12-15 19:03

I have an external executable file which i am trying to run from a Python script. CMD executable runs but without generating output. Probably it exit before output can be ge

4条回答
  •  爱一瞬间的悲伤
    2020-12-15 19:32

    This worked for me after trying everything else: Change the location of your python program to be the same as where the .exe is located. And then the simple:

    subprocess.call("calc.exe") would work.

提交回复
热议问题