On 2/11/21, Christopher Barker <[email protected]> wrote:
> On Wed, Feb 10, 2021 at 12:33 AM Paul Moore <[email protected]> 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.:
#!path\to\venv\Scripts\python.exe
Or with a Windows shell link that runs
path\to\venv\Scripts\python.exe path\to\script.py
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.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/SN4HJZFL3CXOJS53DUTQDRQ4MCXRLERT/
Code of Conduct: http://python.org/psf/codeofconduct/