Linked by Eugenia Loli on Fri 14th Sep 2007 23:08 UTC
General Development As a system administrator, you run across numerous challenges and problems. Managing users, disk space, processes, devices, and backups can cause many system administrators to lose their hair, good humor, or sanity. Shell scripts can help, but they often have frustrating limitations. This is where a full-featured scripting language, such as Python, can turn a tedious task into an easy one. Python is a scripting language that looks like it was made for system administrators.
Thread beginning with comment 271414
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Not quite so fast cowboy
by Dasher42 on Sat 15th Sep 2007 00:37 UTC in reply to "Not quite so fast cowboy"
Dasher42
Member since:
2007-04-05

There is 1 problem with Python as a language for a "Systems Administrator". That problem is that perl is installed by default on ever unix variant under the sun and python isn't.


Subjectively, I disagree with that style of thinking. As a system administrator, you should know how to work in a minimal environment, yes. But to suggest that you shouldn't avail yourself of a good tool because some vendor doesn't put it in a default install sounds either too narrowly focused on barebones without acknowledging that not everyone wants such a thing, or stagnant. I want neither.

Reply Parent Score: 8

RE[2]: Not quite so fast cowboy
by SEJeff on Sat 15th Sep 2007 02:26 in reply to "RE: Not quite so fast cowboy"
SEJeff Member since:
2005-11-05

Use the best tool for the job. In text processing, perl beats python.

In python, a regexp is a second class object. In perl, a regexp is a first class object. Anyone with proficiency in *both* languages will agree with you.

I love python, but it doesn't make sense for managing "Unix" systems. If the title of the article was, "Why You Should Adopt Python to Manage Linux Systems", I would agree.

You can't always install something as large as python due to business processes or technical requirements. When your company has been managing systems a similar way for 10 years, they might not like to change. (Not reflective of my current job, but true for my previous one.)

Edited 2007-09-15 02:30

Reply Parent Score: 3

RE[3]: Not quite so fast cowboy
by japh on Sat 15th Sep 2007 11:05 in reply to "RE[2]: Not quite so fast cowboy"
japh Member since:
2005-11-11

"In python, a regexp is a second class object. In perl, a regexp is a first class object. Anyone with proficiency in *both* languages will agree with you."

Well, if you consider regexp build into the syntax a better solution, then I guess perl is ahead. I don't find Pythons regexp hard to use and I like the design where you don't cram things like regexp into the language, but keep it in a module.
It will make me type a little bit more, but it also means I usually understand my code better than in perl anyway.

Having said that, I'm not using Python for system administration much. The simple things that I need to do can be done in shell scripts just as well as in Python. The times I use Python is when things should run automatically and a "Permission denied" printed to stderr just isn't enough error handling.

Reply Parent Score: 1

RE[2]: Not quite so fast cowboy
by toomany on Sat 15th Sep 2007 09:54 in reply to "RE: Not quite so fast cowboy"
toomany Member since:
2005-11-09

Yes, it's true. But also is true that some machines doesn't haven't some programs (any program or for a multiple reasons), because customer instructions, environment necessities.
Many years ago back, I used the “joe” editor, until a day said my boss to me; “you would have to be learning to use "vi", because you are going it to have in any UNIX with which you work, whereas the "joe" editor, or a cc (gcc) environment no.

Reply Parent Score: 1