Physical and virtual environments in Python 2.6

At CTL, we have pieces of code being actively used in many obscure, hidden, and sometimes forgotten places throughout our own infrastructure and the larger university's. Recently I started working on a module for the Virtual Forest Initiative, an application that connects data from the Block Rock Forest west of the Hudson river just north of New York City.

Part of this application involves downloading sensor data collected by scientists at the forest. We periodically download this data to a central Linux server called Cunix. We have Python 2.6 available to us on this server, and the code used to download this data is in this repo: blackrock_fetcher

The module I'm working on graphs dendrometer data (a dendrometer is an instrument that measures the width of tree trunks to track their growth). After downloading the dendrometer's CSV data, I wanted to prepare the data in order to graph it in the best way. I chose to do this processing in the fetcher environment, instead of in the browser's front-end code. In addition to just making more sense to do this sort of preparation just once on the "back-end", I saw the challenge of making the code Python 2.6-compatible as an added perk.

My co-worker Anders has developed a Makefile-based scheme for bootstrapping virtualenvs in Python. With some minor adaptation I got this working in Python 2.6. It really just required adding an extra package - argparse in the requirements/virtualenv_support directory.

Now that I have a virtualenv, the pypi ecosystem is available to me, and I'm not limited by the Python packages installed on Cunix.