About
Click here to check if anything new just came in.
May 08 2012
May 07 2012
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
May 05 2012
May 02 2012
May 01 2012
April 29 2012
April 28 2012
April 24 2012
April 22 2012
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...








