Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Operating system is not an oracle and will not guess what your intents are. Python is not the only program that can operate .py files, so you have to specify what program to run it with. I guess, there could be some way to run it with python if no other is specified, but why would you even want that in the first place? Commented Mar 17, 2021 at 9:52
  • this is a bad idea because sooner or later you will have multiple version of python on your windows pc. alternative: for those scripts you want to start by name, create a .batfile which starts that program with your chosen version of python. Commented Mar 17, 2021 at 10:08