Python 2/3 port: result of ``futurize --stage1``: updated Py2 code

Pull request for stage 1 of conversion to Py2/3 compatible source.

As discussed in issue #484.