Redirecting stdio from a command in os.system() in Python

前端 未结 4 629
一向
一向 2020-11-30 10:36

Usually I can change stdout in Python by changing the value of sys.stdout. However, this only seems to affect print statements. So, is there any

4条回答
  •  庸人自扰
    2020-11-30 11:13

    If you want to completely eliminate the console that launches with the python program, you can save it with the .pyw extension.

    I may be misunderstanding the question, though.

提交回复
热议问题