Setting PYTHONUNBUFFERED in the proper place. No longer changing the default encoding -- using PYTHONIOENCODING instead (even though it's not supported in all Python versions).