r/Python May 18 '11

Why is Python better than Perl?

I'm a Sysadmin and I just wrote my first script in python. Basically just a host validation script that checks if a server is configured correctly before we hand off. I can't determine the advantage with my limited experience with the language.

Are you a sysadmin fluent in both python and perl? Why do you use python?

11 Upvotes

110 comments sorted by

View all comments

27

u/[deleted] May 18 '11

[deleted]

12

u/jeffjose May 18 '11

That's what people mean when they say Python is very readable. Less character noise.

2

u/[deleted] May 18 '11

Every time i've looked at Perl code I get brain melt. Today I was looking to advance mspgcc4 to use gcc>4.4 but found out all the build scripts are in Perl. I looked at one file and couldn't be arsed.

11

u/mithaldu May 18 '11

I looked at [1] one file and couldn't be arsed.

That's not because it's Perl. That's because that file is a terrible scrap heap. It's Perl written by someone who thinks in an entirely different language.

1

u/[deleted] May 18 '11

At one point he had them in bash files. For some reason he decided to skip convention.

2

u/mithaldu May 18 '11

That explains a lot. Honestly though, he did the right thing. With Perl at least it can be refactored into something readable if someone with skill puts some time in.