Note – I’m going to assume that you have a working knowledge and installation of the Python programming language. I’m starting with Python modules because in my experience, people coming from other languages may not be familiar with the ‘pluggability’ that Python gives to its users via these modules.
Whenever I persuade my friends to try Python, I introduce two initial arguments – it’s easy, and you can use modules. Most people immediately agree with the “it’s easy” part; Python reads like pseudo-code, and it’s usually trivial to translate a program from your brain to the computer screen. However, it usually takes them a while longer to see what is so special with modules. Novices tend to be familiar with the stock modules like math or os, and more advanced converts might experiment with re.
The real power of Python, though, comes from third-party modules. In a nutshell, it is incredibly easy for developers to package their custom-built Python utilities and distribute them to other coders – a search for ‘python’ on Google Code clearly illustrates this fact. You can find third-party modules for nearly any task – manipulating data, managing a web page, plotting data, or even posting to Twitter. Let’s use that last one as an example to explore how to install and use Python modules.
Python-twitter, a module by DeWitt Clinton, provides easy access to the Twitter API via Python. It’s easy to use – a few weeks ago I built some Twitter functionality into my personal website using it. Even if you don’t use Twitter, I’d recommend reading through this example to see how to install, access, and use generic Python modules. Continue reading ‘Visualizing Climate Data – I – Using Python Modules’
