Hide the console of an .exe file created with PyInstaller

You can just save the file with .pyw extension and you can just use pyinstaller --onefile Filename.pyw
I think you renamed it. You save it as .pyw don't rename it. The screenshot are below: enter image description here

enter image description here

enter image description here

Output:

enter image description here

But it takes a while to open.
Thank you
-Levers


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.


Did you try --windowed command line flag ?