Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That would be really bad.

The new scripts should just use the right #! string



  #!/usr/bin/env python2
There, fixed it.

Much like `#!/usr/bin/env bash` for bash scripts instead of `#!/bin/bash` (which won't work on many OSes)

https://github.com/search?q=%23%21%2Fusr%2Fbin%2Fenv+python2...


You can't "there fixed it" for the infinite number of projects that exist in the field that this breaks. "It never worked on FreeBSD" is very different from "it no longer works on new versions of RHEL".


>You can't "there fixed it" for the infinite number of projects that exist in the field that this breaks

Of course you can. Python files are plaintext.

    $ find ./some/module -name "*.py" -exec sed -e 's:#!/usr/bin/python:#!/usr/bin/env python2:g' -i {} ;


if changing a hashbang is that big of a deal, the codebase is completely mortibund going forward, and support is dropping in 2020 anyways.

I don't think people should be concerned about people that are that totally resistant to change.


or just use `#!/usr/bin/env python2` (python3) and don't care what is actually on the drive


It could be configurable (like with /usr/bin/c++) or at least be the case when python2 isn't installed.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: