Fixed a few lines to make the code compatible with python 2.6 (used by Maya 2012).