Is Python as capable as Perl for system administration?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is Python as capable as Perl for system administration?
I like Python. It seems nice and clean (syntax-wise) to me. I'd like to get more into using it for serious system admin stuff. I notice that many folks use Perl for that.
When the rubber meets the road, is Python as capable as Perl for system administration?
I personally prefer Python to Perl only because I'm more comfortable with it and I like the syntax layout better. It is certainly a decision to be made personally, and with anyone who has to deal with your code.
Y'know, nearly everyone I talk to prefers Python (due to its simplicity mainly). Given that, I'm still curious why Perl enjoys such popular use. I mean, it's used everywhere, and the docs are extremely good (I'm thinking of the Oreilly Perl books, which are really shining examples of great technical writing).
keefaz -- careful; there's female sysadmins out there too.
I would think Perl is liked because of its Unix syntax, I mean most Perl commands name
are the same name as Unix ones (mkdir, find, grep, reg exps, tr..) also as Perl is good for
manipulating text, it can be used to parse config files, logs, process outputs and make
reports.
keefaz, I see your point. I wonder, (since I don't have too much experience with it) does Perl provide more or easier access to your Unix system under the hood than Python?
Python is a great language and MUCH MUCH simpler to learn and troubleshoot if needed. Perl remains popular because not every admin got their job 5 years ago. Like all languages, they both can do most anything, but are better suited to certain items. Heck, I see admins still using Common Lisp because it's what they know or its suited to their purpose. I like Perl, but most of my simple programming is Python or Ruby these days.
If you like trends, try out Ruby. It's the "next" big thing. I personally think it's easier than Python and you don't have to have "perfect" syntax to make it work.
Thanks for the reply ghight. No, I don't like trends. I like simplicity and minimalism (and good docs :). Trouble is, I also want to find a job doing admin work. I know I'll need to know *some* Perl, but I'd like to be able to look into the crystal ball and learn if Python can deal with the sticky issues when things get complicated and ugly.
You would be good to learn a little of as much as possible. A good quote for an admin in need of a job is "I know a little about everything and everything about very little".
If you are not currently a sysadmin, I'd say you should spend a bulk of your time with Perl. Python is very popular but not so much as a scripting backend yet (although it's perfectly capable of doing so).
> You would be good to learn a little of as much as possible.
Heh. Story of my life. Trouble with that is, it makes you an unemployable renaissance man (at least in my experience). Hopefully I'm wrong about that though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.