Use Py2/Py3 compatible octal number syntax

See, http://legacy.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax
Make zope interfaces declarations Py3 compatible
Use print as function
Use Py2/Py3 compatible StringIO import