0
0

Python, Where Have You Been All My Life?

Posted on 2007-09-05 00:01:31 UTC.

image
A few years ago, I got a comment back from someone about CheckBook Tracker, the personal finance software I wrote for Linux. He had learned I wrote it in Pascal and wondered "Why didn't you use Python?" I snickered to myself "a scripting language for a personal finance application? You've got to be kidding me!"

Now that I've been programming python for a little over three weeks, I wish I'd picked it up a long time ago. Then again, I didn't really have a need to.The problem with Python is that you need the interpreter installed. This is much like Visual Basic, only it feels a little more bloated because you're not just installing a DLL. If you are using Python in Windows, there's a good chance you'll also need GTK installed, and PyGTK python libraries as well.

For Windows users, I've already had problems getting them to be able to use my "ldsripper" application that scrapes the scriptures from the web and formats them for Thummim Reader. This isn't because the program is hard to use, but because it requires all the cool Python and GTK stuff be installed properly, which is no easy task unless you find the right installer.

Dell or HP or someone used to package Python pre-installed, along with several small games. I don't know that they still do.

For this reason, I'd still be hard pressed to recommend full fledged application development for Windows in Python. Then again, screw Windows, I'm a Linux developer and that makes things a bit easier. In fact, I can roll a debian package that tells the computer "Hey, when you install me, you need to install Python, too."

Enter the Nokia n800. Wow, this little gadget is everything I ever wanted in a handheld, at least until I got one and started imagining so much more I wanted one to do. And, it's got Python, not preinstalled, but there's an easy way to install it.

In the past three weeks I've not only learned the basics of Python programming, but learned GTK 2 development with it in addition to PyGame SDL development. I've ported one Python application to Maemo, written a complete application with it, released a Python widget to make Maemo pygame development better and made good progress on a new RPG in Python for Maemo written completely from scratch.

Having a strong background in PHP, Javascript, Visual Basic and Pascal have certainly made things easier. I've never been a C or C++ programmer, despite the bit of C development I did for the Amiga back in the early 90's. For some reason the syntax always looked strange to me, and I found reasons to stay away from it. I guess that's one reason I'm not employed as a programmer today, despite the volume of code I write for both personal and work use.

So I was thinking to myself, what other things would I use Python for other than developing on the Nokia? Then I saw a changelog that showed that OpenMoko was integrating Python as well. Even the iPhone can run Python now. Perhaps Python will be the mobile language of the future, and where is computing going if not mobile?

Back