Pregunta

Possible Duplicate:
How can I hide the console window in a PyQt app running on Windows?

When I double-click in Windows on my pygame app (.py) the desired pygame window opens, but always along with it, an empty terminal window pops up. How can I prevent this?

¿Fue útil?

Solución

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

See Using the Python Interpreter:

2.2.2. Executable Python Scripts

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top