Powerful Python

PythonDespite yesterday’s talk of hopelessness over MIT moving it’s intro course to Python, I have no qualms about saying that Python is my favorite general purpose language. It has a neat syntax, a clean module system and lots of functionality built into the language. It’s also pretty easy to learn even if you’ve never programmed before and if you have programmed before you’ll be surprised at how much easier Python lets you get things done than a lot of other languages. There are a lot of modules out there which extend Python’s usefulness (Numpy and PyGame are the ones that most quickly come to mind). There are also bindings to cross-platform toolkits like Qt and GTK+ as well as an interface to interact with Objective-C based toolchain used by OS X. Even more interesting is Jython: a port of Python that runs on the JVM and lets you access the functionality that the Java platform offers.

Of course Python does have its share of quirks. The object system and it’s associated scoping rules take some getting used. It also uses whitespace indentation as a way to determine block nesting. It’s not something that you can’t get used to and I don’t mind it at all, but I know it drives some people mad. But let’s face it, no language is perfect and Python is really pretty good for a lot of things.

I’ve had a good time learning Python. It’s documentation is pretty good and the dynamic typing gives you a lot of flexibility which can be very empowering, especially if you come from a static language like C++ or Java. I’ve written a few Python posts in the past, but there’s still a considerable amount that I’d like to share with readers. I’ve decided to start a new series where I write articles covering slightly advanced and what I hope will be helpful Python topics. I’m not sure yet what format they’ll take on, but they will include example code, howtos, and maybe some references to similar features in other languages. You might want to bookmark this page as I’ll keep updating it with links to the new articles whenever I put them up. Here are the articles that I’ve already written and ones that I’m planning. If there is anything that you want to write about, please let me know

8 thoughts on “Powerful Python

  1. s/It’s documentation/Its documentation/

    I’d love to see more advanced topics about programming and programming tools. (oh tools… for some reason, I love reading about tools all the way from specific libraries up to desktop environments.)

    Also, I have to say I don’t like the way the new theme handles code snippets, specifically the line numbering, which makes it hard to just copy&paste. I realize there’s a button there that opens a pop up with plain text version, but what can I say, I hate pop ups! And the other buttons there just seem redundant: There is one flash button which I couldn’t figure out since it doesn’t seem to do what it’s supposed to do with swfdec. (No, I am absolutely not considering using a non-free solution for that πŸ˜‰ I can’t see a situation where one might want to print out these short snippets, so the print button is unnecessary. And the “?” button is just for showing plug-in info. (which is also opened as a pop up, I might add πŸ™‚

    I’m sure there are solutions for displaying code in proper highlighting in regular plain text.

  2. @ Ali Gunduz: I do appreciate getting comments, so I can’t say I mind. As for the code, the second button from the left should copy directly to your system clipboard. However, if people are having problems, there are other plugins I can try.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s