2

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?

Community
  • 1
  • 1
gandreadis
  • 3,004
  • 2
  • 26
  • 38

1 Answers1

2

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.

sloth
  • 99,095
  • 21
  • 171
  • 219