> A much larger portion of programmers have meaningful experience writing python than perl or php
Yes, I would agree, and this has value. But if you're in the position of making the decision of what to use and you know both, then that changes things. It's the same thing with Bash. Lots of people, and sysadmins, know bash, so they write bash. But bash is still not the optimal choice for, I'd say, 90% of the stuff it's chosen for. And it's a self-eating beast. Shoving bash where it doesn't go only strengthens it's grip. You're feeding the gremlin, you know?
> Just avoid external dependencies and use /usr/bin/python
I think this is easier said than done and it's also partially cultural. I have seen many, many system scripts that assume a very recent version of python AND assume a bunch of python libraries. This is bad, and people need to stop doing this. At least have the decency to bundle the libraries or, better yet, statically link them using C or C++ or Rust or Zig or whatever. And if that seems overkill to people, I think that means they haven't considered what they're actually doing and if they even need those external libraries.
Bash has this problem, too, and much worse, because it just calls system utilities. So it assumes a very specific running environment.
Anyway, all of that being said, if you're not using any libs than maybe Python is fine, if you know the systems you're targeting will have Python. If not though, I stand by Perl. Just use 5.10 or whatever and boom, that shit will run truly anywhere.
Yes, I would agree, and this has value. But if you're in the position of making the decision of what to use and you know both, then that changes things. It's the same thing with Bash. Lots of people, and sysadmins, know bash, so they write bash. But bash is still not the optimal choice for, I'd say, 90% of the stuff it's chosen for. And it's a self-eating beast. Shoving bash where it doesn't go only strengthens it's grip. You're feeding the gremlin, you know?
> Just avoid external dependencies and use /usr/bin/python
I think this is easier said than done and it's also partially cultural. I have seen many, many system scripts that assume a very recent version of python AND assume a bunch of python libraries. This is bad, and people need to stop doing this. At least have the decency to bundle the libraries or, better yet, statically link them using C or C++ or Rust or Zig or whatever. And if that seems overkill to people, I think that means they haven't considered what they're actually doing and if they even need those external libraries.
Bash has this problem, too, and much worse, because it just calls system utilities. So it assumes a very specific running environment.
Anyway, all of that being said, if you're not using any libs than maybe Python is fine, if you know the systems you're targeting will have Python. If not though, I stand by Perl. Just use 5.10 or whatever and boom, that shit will run truly anywhere.