[docs] [issue27263] Tkinter sets the HOME environment variable, breaking scripts
Terry J. Reedy
report at bugs.python.org
Sat Jun 11 03:33:22 EDT 2016
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 never fails (?), this might make some sense - but only if they are not the same.
Zach, I was thinking that _tkinter read TCL_LIBRARY to start tcl, but your answer suggests that it is instead read by tcl.
The problem with bad TCL_LIBRARY is that if IDLE is started normally, there is no error message. Even if the user tries starting in the console, the message is almost useless. I "set TCL_LIBRARY=NONE" and got
...
File "C:\Programs\Python35\lib\tkinter\__init__.py", line 1867, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
NONE C:/Programs/Python35/lib/tcl8.6 C:/Programs/lib/tcl8.6 C:/lib/tcl8.6 C:/Programs/library C:/library C:/tcl8.6.4/library C:/tcl8.6.4/library
Everything after NONE is nonsensical. The IDLE doc needs a new sections "If IDLE does not start:. Now I could write a troubleshooting note explaining for this note to ignore everything after the first item, and that the first item is an unusable setting of TCL_LIBRARY set by something or someone other than Python/Tkinter/IDLE.
I tried the same experiment with TK_LIBRARY and could see no effect.
----------
assignee: -> docs at python
components: +Documentation, IDLE
nosy: +docs at python
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27263>
_______________________________________
More information about the docs
mailing list