سؤال

I have compiled my python script in an .exe file via PyInstaller.

The problem is that, now when running the .exe application, two windows are opened, one is the GUI interface which is ok, but the other is kind of windows command window, which I would like not to open.

Would it be possible?

هل كانت مفيدة؟

المحلول

If you're using PyInstaller try to use -w option when building your app.

نصائح أخرى

If you are using py2exe,

setup(windows=['your_code.py'], ...)

instead of console

See Make a py2exe exe run without a console?

UPDATE

pyinstaller manual says

 -w, --windowed, --noconsole 

use a windowed subsystem executable, which on Windows does not open the console when the program is launched. This option is mandatory when creating .app bundle on Mac OS X.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top