4 ms·
Python is available virtually anywhere. I'd also not use Bash unless it's a very restricted situation. Every time I'm writing a shell script that's more than a
by gtirloni 2y ago
Python is available virtually anywhere. I'd also not use Bash unless it's a very restricted situation. Every time I'm writing a shell script that's more than a page, a sense of imminent doom starts to dominate my soul.
- bongodongobob 2y agoNo it isn't. I don't know what kind of infrastructure you work on but I can't just go installing python on prod servers whenever I want to be able to run some random script.
- catlifeonmars 2y agoWhy are you running random scripts on prod servers? ;) :P
- gumby 2y agoSometimes the only way to investigate a problem. How can you even write a test case if you don't know what's going on?
- ElectricalUnion 2y agoI think that people that work on RHEL often assume python just "exists" everywhere because DNF has a python dependency, same for Debian, apt and perl.
- gtirloni 2y agoIn Kubernetes, you can attach a debug container with Python to a running pod. On VM's you can use pyenv for a local Python installation if you don't want to install it globally. In Docker vanilla, you can run another container with Python that uses the same namespaces (ipc, pid, network) as your other running container without Python. There are options. If your security team forbids Python for some reason, I would wonder why they are letting systems have bash/curl/etc on them.
- layer8 2y ago“Python” isn’t very well-defined. Which version? Which (installed) dependencies?
- gdevenyi 2y agoPython subprocess is terrible. Until they provide a much smoother interface for running other programs, bash will continue to dominate scripting.
- coderatlarge 2y agoPython is not available by default on macOS.