0

There has got to be someone on this website with the same problem as me, so I apologize in advance; I couldn't find an answer to this anywhere on stack overflow even though I'm sure it's there somewhere.

When I run my Python 3.8 program, it opens my game with pygame like I'd expect. However, it also opens an empty command line window. How can I prevent the command line window from appearing? I have no use for it, as all user interaction will be through the pygame window.

NoRt9001
  • 90
  • 1
  • 1
  • 9
  • 1
    I recommend to use `pythonw.exe` instead of `python.exe` in the shortcut file used to start your Python game. See [pythonw.exe or python.exe?](https://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe) – Mofi May 02 '20 at 18:24

1 Answers1

0

I've found a solution, thanks to Mofi.

On Windows, right click your .py file and set the default app to pythonw, instead of python. You should be able to find it in C:\Users\ ######## \AppData\Local\Programs\Python\Python##.

Now, opening your program will open without a terminal.

NoRt9001
  • 90
  • 1
  • 1
  • 9