Changes to make Python code run okay on Linux/ Python 2.6.