4 ms·
I disagree but only about 50%. Python is not really very slow overall unless you’re on windows. When you get to serious computing then breaking out of python i
by dijit 5y ago
I disagree but only about 50%.
Python is not really very slow overall unless you’re on windows. When you get to serious computing then breaking out of python is possible, but systems administration is not the place to do heavy computation.
As for debugability, I find python to be easier, set -/+x is great, but that’s not doing much more than printing out every line of execution, there’s no interactive debugger like python has afaik.
The killer thing for me is that python has modules for basically everything, which is awesome.
The thing that kills python for me is that I can’t be 100% sure if what version may exist on a system; and worse: if I actually use any modules then I have to somehow get them on the system.
For systems administration, this is pretty close to a non-starter. Prevailing sysadmin knowledge is that the admin tools should not horn in excessive dependencies, since sysadmin tools should work when the system isn’t fully set up.
This is why go is so great. But go is harder to debug than python in my experience.
- TomSwirly 5y ago> The thing that kills python for me is that I can’t be 100% sure if what version may exist on a system; pip handles that automatically - you set which version numbers of Python you can handle in your project specification. > and worse: if I actually use any modules then I have to somehow get them on the system. pip handles that too! ---- I'm not quite sure what the problems are, but between virtualenv/venv, pip, and modern package managers like poetry, this is really a solved problem - something you spend an hour setting up when you start a project and just never think of again. I do this so much I have a shell function, `nenv`, which creates a new virtualenv with a specific Python and then loads its dependencies into the virtualenv. It gives me tremendous freedom. For example, I can heavily instrument other modules' Python code inside the virtualenv (to find their bugs, e.g.) and then throw it all away and recreate it fresh in a few keystrokes. --- There are OK, well-known solutions to most of the common packaging and distribution problems with Python programs you might have. If you go back to it, you should spend a bit of time with this, it isn't that bad. (Poetry seems really cool - when I start something new it'll be with that.)
- dijit 5y agoit's weirly naive to assume I don't know about pip as a python user as it's a bit ubiquitous. That said: This is very much a developers take on the packaging situation in python. Running virtualenvs is "fine" until you're not connected to the internet, a less-and-less common scenario thankfully. pip itself (without virtualenvs) will "dirty" the system, or you use the --user flag and make it work only for one user. The situation for systems administrators is to do things that do not mess with the developers, if I install a package, especially with a version lock, and it directly conflicts with a developers (less and less of a problem with containers!) then they're going to be very cross with me.
- keymasta 5y agoThis may be a silly question, but how would you think to install packages if not with pip? I used to see python the same way, and coding on my megalithic single file would always take a couple hours to set up on a fresh computer. Then I discovered requirements.txt, where you simply list each package you need and the version (range) desired and then run: pip install -r requirements.txt this will install everything unless it's fucky like for example, pip install kivy-garden.matplotlib will not work with pip but everything else does.
- Annatar 5y ago"This may be a silly question, but how would you think to install packages if not with pip?" Through the native software management subsystem: RPM, SVR4 packaging, pkgsrc, MSI... always use the native software management subsystem - that is what it is there for, for developers to deliver their software with.
- Annatar 5y ago"Running virtualenvs is "fine" until you're not connected to the internet, a less-and-less common scenario thankfully." Any high security environment (read: the financial industry) will have most of the servers purposely not connected to the InterNet, to prevent people from doing exactly the above and from attackers hacking in. Energy and pharmaceutical industries - same thing. That's the norm, not the exception, so pretty much any industry which is critical for society at large won't allow access to the InterNet.