Python.exe opens in a new console window

前端 未结 3 1868
感动是毒
感动是毒 2021-01-25 13:28

I used to run Python scripts from my Windows command line, and all the prints were printed in the same console. Now something happened on my machine (Windows 10), and when I lau

3条回答
  •  暖寄归人
    2021-01-25 14:10

    Not sure how useful this will be but I had this same problem, found this thread, and realized that the new console window was opening up when I omitted 'python' from the command.

    >python myscript.py
    

    shows the output right in the terminal where I typed the command, but

    >myscript.py
    

    opens the new console window and closes it immediately after the script runs.

提交回复
热议问题