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

Unfortunately the Python 3 debacle kind of ruined standalone Python scripts. At least for a while. Have distros gone back to having "/usr/bin/python" available (as opposed to "python3" or something else)? I bet there's still loads of system in the wild without a "/usr/bin/python", though.


Scripts should be using `/usr/bin/env python3` anyway, so they work inside virtualenvs and other scenarios where `/usr/bin/python` isn't the Python you want.


> Have distros gone back to having "/usr/bin/python" available (as opposed to "python3" or something else)?

Debian provides two packages python-is-python3 and python-is-python2 to restore the /usr/bin/python.


What's wrong with explicitly using "python3"? I guess maybe in theory you could maybe write a script that was compatible with both 2 and 3 but that sounds needlessly masochistic, and if there were ever going to be a python4 you wouldn't want to accidentally switch to it automatically either.




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

Search: