Start of Python 2 port.