modifications to support python-3.x by means of 2to3.