Py3 compatibility for scripts.