Hide the console of an .exe file created with PyInstaller

前端 未结 2 633
灰色年华
灰色年华 2020-12-13 21:41

I want to make my program executable. I used TkInter to write the GUI, and I read somewhere that you have to save your file as .pyw to hide the console when the program is e

2条回答
  •  被撕碎了的回忆
    2020-12-13 22:20

    What are you using to make the executable?

    If you use py2exe and you use:

    setup(windows=[pythonscriptnamehere])
    

    in the setup script instead of:

    setup(console=[pythonscriptnamehere])
    

    it will run the executable without launching a terminal in the background.

提交回复
热议问题