I finally tried Python

Jul 25, 01:31 am
tags:

python
I’ve been branching out lately and trying to learn Python. I got a Python book a while ago, and just didn’t take the time to work with it at all. However, the Fedora Project uses Python extensively for just about everything, from the build system, to web-hosting to smolt (A really cool HW tracker in Fedora), to Yum and the system-config-* tools, so I thought there must be something great in here somewhere and I just haven’t found it yet.

I normally write a lot of PHP and Perl. I use bash for the quick and dirty also. After working through a few hours of Python, I was amazed. The biggest plus, it’s readable. There’s nothing worse than having to maintain someone else’s Perl code. It’s just not nice, even if the person was a wonderful Perl coder, I normally find it takes me quite a while to figure out exactly how/where something is occurring. With Python, at least thus far, it’s readable, it requires indenting, and it’s easy. Now that I have worked through Beginning Python, and written a few administration scripts, I feel better. I can see a real future for my usage of Python as an administrative tool.

I’m also enjoying it having me think about problems from an OO approach. In my normal administrative world, problems are isolated and often times solved by a quick script and series of scripts that run procedurally and not in OO format. The OO format hopefully will offer a bit more code reuse, or at least help me recall some knowledge forgotten in CS classes of yesteryear.




Add your comments

Please keep your comments relevant to this blog entry: inappropriate or purely promotional comments may be removed. To add hyperlink, please follow this example: "your link text":http://your.link.url