[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2021-02-26 Thread Eryk Sun
Eryk Sun added the comment: ntpath.expanduser() no longer uses HOME (though the doc string still refers to $HOME), so at least that problem is resolved. I suppose IDLE could work around the HOME issue in Windows by passing env=os.environ.copy() in the subprocess.Popen() call that creates th

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: How about wrapping the appropriate tkinter code with (untested yet) import os HOME = os.environ['HOME'] try: finally" os.environ['HOME'] = HOME # will this unset? or use a restore_env('HOME', ...) context manager? Revising os.expanduser or apps to ig

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-13 Thread Jarrod Petz
Jarrod Petz added the comment: eryksun, now I understand this is a bit more challenging because tkinter is the underlying library doing this and it is shared by other apps. Though I still don't feel that just because its been like this since 1995 means it should stay this way. This is somethin

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-11 Thread ppperry
Changes by ppperry : -- nosy: -ppperry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: ppperry, when I changed this to a doc issue, I added IDLE back as a component because, as I said in my last message, I want to include the facts revealed here in the IDLE doc. -- nosy: +ppperry ___ Python tracker <

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-11 Thread ppperry
Changes by ppperry : -- components: -IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: #14576 is more or less about making better use of USERPROFILE when the value returned by expanduser to config.IdleConf.GetUserCfgDir fails. Now that I know that tcl always sets HOME (or pieces that are joined back together to make HOME), so that expanduser ne

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-10 Thread Zachary Ware
Zachary Ware added the comment: For the original issue, I agree with Eryk that about the best we can do is to document that Tcl sets HOME as "%HOMEDRIVE%%HOMEPATH%" or "c:\" if both of those are not set. I wonder about removing (or de-preferring) HOME in os.path.expanduser, but that would be

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is Windows specific issue, I can't help with this, sorry. Zach should be more experienced in this. -- ___ Python tracker ___ ___

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Python does not set TCL_LIBRARY. _tkinter finds tcl/tk installed with Python at its known location for the platform. tkinter and IDLE work fine for months. Then user installs another program. That other software (not user, and unbeknownst to the user) sets T

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the problem? That user sets incorrect TCL_LIBRARY? I don't know how _tkinter can distinguish correct TCL_LIBRARY from the incorrect one. -- ___ Python tracker __

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +markroseman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: As IDLE maintainer, this annoys me also. IDLE and in particular test_idle necessarily change the environment by calling tkinter.Tk(). When run under test.regrtest, test_idle gets slapped with a warning, and in 3.6, gets labelled a failure, even when it passes