Sep-28-2016, 03:11 PM
(Sep-28-2016, 02:58 PM)metulburr Wrote:(Sep-28-2016, 02:55 PM)sparkz_alot Wrote: An example is, starting with v3.3, windows now recognizes the shebang line, so now
Python Code: (Select All)
#! /usr/bin/env python3
works in both Linux and Windows.
I have never heard of this. How exactly would windows know where to find python as the shebang line path is linux binaries directory?
It's here (about halfway down) https://docs.python.org/3/using/windows.html, I took the liberty of using their sample and ran it using python, python2 and python3 in that order (note: I do not have python v2)
Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\>cd python C:\Python>test.py hello from Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] C:\Python>test.py Requested Python version (2) is not installed C:\Python>test.py hello from Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] C:\Python>pretty cool :cool:
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition