Sep-14-2017, 03:25 PM
(Sep-14-2017, 02:50 PM)metulburr Wrote: I dont mean to hijack but i kind of am doing it
Quote:From there, you can just type "hello.py".You can just type the filename now in Windows? How do you define which python interpreter goes with which python file?
File associations. Windows doesn't care about shebang lines, but if .py is associated with python, then python will be used to "open" the file, which, for python, means it'll be run. I don't think this works in the file explorer and double clicking the file (it's just opened in your editor for... editing). There's a special python launcher (pythonw.exe) that ships along with python, which is what file associations are bound to. THAT will (depending on the version, I think) check for a shebang line, and try to route the script to the right version of python if it's installed.