Tuesday, October 1, 2013

Python 2 and Python 3: Two 'different' platforms

When you decide to do any Python development today, the first choice that you come across is the version of Python that you want to use. There's Python 2, the programming platform with lots of libraries that do everything except defying gravity, and then there's Python 3. Python 3 is really good as a language, but we have yet to see the programming libraries and support from the larger community. There are tools to assist in porting Python 2 code to Python 3, and vice-versa but there just has not been enough interest generated within the community to create the everything-but-the-kitchen-sink feeling among Python 3 users so the 'early adopters' (c'mon, it's been a few years since Python 3 was introduced, it isn't early any more!) don't really get all of the niceties that Python 2 users get.

The one area where you would notice a shortfall of Python 3 is in GUI application development. Most GUI libraries/frameworks are in a beta or beta-like stage and using them is like having a swinging pendulum-blade right over you. For web development, there are frameworks supporting Python 3 so if your framework of choice does not support Python 3 yet, you can simply switch over to another framework that does.

If you are a newbie who wants to learn Python, there are a couple of built-in Python modules that have been renamed so you can't follow all the examples that you see online if all you have is a Python 3 environment (or vice-versa, in which case you have a Python 3 example but all you have is Python 2 installed). I have been tinkering with Python every now and then, and when I decided to actually take the plunge and adopt Python 3 for automating some of the application configuration that I occasionally have to do, I started off with Python 3. Initially, figuring out the differences in the names of the modules took a while. Now, I don't even look back at Python 2 and hope everyone else becomes a part of the shift from Python 2 to Python 3.

No comments: