How to set to native Python env vars for IDLE in Windows? Like PYTHONIOENCODING, PYTHONLEGACYWINDOWSSTDIO and so on.
A quick search here didn't find anything relevant except this, but this question is related only to Linux.
Web-search also didn't bring useful results, I tried follow this guide, which simply says one should define Windows user env variables in Control Panel, but this doesn't work.
When I do in IDLE
import os
print(os.environ['PYTHONSTARTUP'])
it throws:
Traceback (most recent call last): File "<pyshell#1>", line 1, in print(os.environ['PYTHONSTARTUP']) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\os.py", line 679, in getitem raise KeyError(key) from None KeyError: 'PYTHONSTARTUP'
Should it work for IDLE and I just check it wrong or this is valid only for commandline Python?