How to avoid console window with .pyw file containing os.system call?

后端 未结 6 1093
既然无缘
既然无缘 2020-11-29 08:59

If I save my code files as .pyw, no console window appears - which is what I want - but if the code includes a call to os.system, I still get a pes

6条回答
  •  一个人的身影
    2020-11-29 09:23

    You could try using the subprocess module (subprocess.Popen, subprocess.call or whatever) with the argument shell=True if you want to avoid starting a console window.

提交回复
热议问题