On 2/11/21, Christopher Barker email@example.com wrote:
On Wed, Feb 10, 2021 at 12:33 AM Paul Moore firstname.lastname@example.org wrote:
So get PYTHONUTF8 added to the environment activate script. That's a simple change to venv. And virtualenv, and conda
That's probably a good solution for venv and virtualenv -- essentially add it as another environment creation option.
Note that using a virtual environment does not require activation. A script can be deployed to run in a virtual environment by referring to the environment's executable in a shebang line, e.g.:
Or with a Windows shell link that runs
Setting PYTHONUTF8 in the activate script does nothing to educate users about the default encoding in other contexts. The REPL shell could print a short message at startup that informs the user that Python is using UTF-8 mode, including a link to a web page that explains this in more detail.