How to hide the python console window?

Hi my friends,

I have used the py2exe to build a “.exe” for my wxpython project, when the “exe” file run, it’s always show the python console window.

Is there any way to hide the console windows when run the “.exe” file?

I have seached this question on google, some guys said we can use ‘vbs’ to hide it, but as you know, all of us are used to click “xx.exe” to run a windows program.

Please help me, thanks!

usr root

Rename your .py to .pyw and regenerate the .exe

Hi,

usr.root wrote:

Hi my friends,
I have used the py2exe to build a ".exe" for my wxpython project, when the "exe" file run, it's always show the python console window.
Is there any way to hide the console windows when run the ".exe" file?
I have seached this question on google, some guys said we can use 'vbs' to hide it, but as you know, all of us are used to click "xx.exe" to run a windows program.

In setup.py use:
    windows = [script1, script2]
instead of:
    console = [script1c, script2c],

Werner

try renaming the python scripts. instaed of *.py rename it to *.pyw.
Haven't tried it but it might work

···

On 8 ruj, 12:41, Félix Palazuelos Pérez <felixpalazue...@gmail.com> wrote:

Rename your .py to .pyw and regenerate the .exe

Oh, shit, did not see the post before. sorry mates

···

On 13 ruj, 14:32, azrael <jura.gro...@gmail.com> wrote:

try renaming the python scripts. instaed of *.py rename it to *.pyw.
Haven't tried it but it might work

On 8 ruj, 12:41, Félix Palazuelos Pérez <felixpalazue...@gmail.com> > wrote:

> Rename your .py to .pyw and regenerate the .exe