I recently tried opening one of my Python projects with CMD to see what would happen. The result did nothing amazing, but Windows 7 thought I wanted to open .py files in CMD all the time.

I have tried everything, setting it back to python.exe does not work, I even went to Control Panel to see if it could help, but Control Panel couldn't help either. So if someone could help me please that would be great.

2 Answers 2


I'm not a windows user, so I may be wrong here. But at least under UNIX, the python executable is just an "interpreter", just like other UNIX shells. Like many tools out there, it reads and writes from and to standard input and output+error.

It is not a terminal by itself, these programs need to be attached to a terminal (be run from a terminal) — or a terminal emulator, as you do under X Windows System or the Microsoft Windows graphical interface.

So, without any specific knowledge of Windows, I'd guess you need to start python.exe through a terminal emulator. As cmd.exe really opens a window when it's invoked from the Windows graphical shell, I'd try either setting the command to open python scripts as cmd.exe python.exe, or cmd.exe with parameter python.exe.


If you open the properties page of a python script you should see the associated application for running this type of file in the upper half. There should also be a change button.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .