Python terminal window appears when pygame application starts

Possible duplicate:
How to hide a console window in a PyQt application running on Windows?

When I double-click Windows in my pygame (.py) application, a window opens asking for pygame, but always with it an empty terminal window opens. How can I prevent this?

+2
source share
1 answer

Change the file extension of your file from .py to .pyw .

See Using the Python Interpreter :

2.2.2. Python Executable Scripts

The Python installer automatically associates .py files with python.exe so that double-clicking on the Python file starts it as a script. The extension can also be .pyw , in which case the console window that usually appears is suppressed.

+2
source

All Articles