Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

May 08 2012

admingruppen
18:36

May 07 2012

admingruppen
19:24
8945_3af4
04:08

Learning Python for Sysadmins?

During the last year or so I've been struggling with learning python for scripting simpler sysadmin tasks.

My first real attempt to write anything (re)usable for my day job as a Sysadmin was a simple scaffolding framework for wrapping up python in a cli-friendly way. After trying out optparse I found that argparse was probably the best way to parse different arguments from the command line to a python script. I wrote some lines with it and tried it out but never made any real progress.

I haven't got the time to play with it thouroughly yet but my plan was to write a small template and reuse it when I further dwell into python scripting. As a template file with some basic functions for parsing command line arguments is highly reusable for a Sysadmin, I thought the investment in learning some python would pay off in the long run. I skimmed through Python for Unix and Linux System Administration a couple of times but never wrote anything put in production with it yet. When it comes down to creating small scripts I still reach for bashs bultins, awk and other familiar command line tools.

The little time I spent so far with python seems like time well spent and I really like its syntax and semantics. It's a readable language with easy semantics. As a unix/linux technician I've spent a lot of time with inherited scripts. And in a myriad of different languages ranging from C to simple shell script languages. But none of them is as straight forward as python.

And the concept of reusable code, in a clean and simple syntax and which stands as readable now as ever, is a very nice one. I just hope this feelings doesn't get muddled when I dwell deeper into developing with python. I'm highly aware that every sysadmin out there thinks their code is self documenting, reusable with minor modifications and their language is the most efficient and best choice for whatever reasons. No matter if it's perl, bash, powershell, awk, ruby, php or C.

May 06 2012

admingruppen
19:03
12:00

May 05 2012

admingruppen
17:35
5292_10f7_500
admingruppen
17:34
5295_4ef5
admingruppen
09:16
1174_2839
admingruppen
09:14
1179_5354_500
admingruppen
09:12
1182_964a
admingruppen
09:12
1184_d44e_500

May 02 2012

admingruppen
16:03

May 01 2012

admingruppen
16:39
1999_3210_500

April 29 2012

12:00

April 28 2012

admingruppen
08:27

April 24 2012

08:11

April 22 2012

admingruppen
16:14
0201_b824_500
Reposted byriskera riskera
15:49
12:00
11:09
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.