unbuffer stdout; fix pre-commit-hook for py3