|
|
|
|
|
by II2II
1683 days ago
|
|
The main example I can think of is when you don't know what python links to. For example, an Arch system will links to some version of Python 3. I believe that Debian based systems link to some version of Python 2. You could just swap python with python3, but if your script supports Python 2 as well and you're trying to run it on a system without Python 3, it will fail. Of course, if your script will run under both Python 2 and 3, I don't know why you would want to use these contrivances to simply give preference to Python 3. |
|
The article is literally about this scenario, which is why I'm also confused. Yes, `/usr/bin/env python` is a bad idea IF your script depends on a certain version, but that's exactly what the author doesn't need!