Terry J. Reedy added the comment:

I and others constantly tell people to start IDLE from the command line when 
they have a problem.  Today, someone actually followed the advice and the 
traceback revealed that the problem was a personal tkinter.py masking the 
stdlib file!  Renaming it to mytkinter.py fixed the problem.  This tell me that 
'fixing' sys.path for the idle process must be done immediately after importing 
sys and before importing tkinter.  In the user process, the sys import should 
again be first, followed by the fixup.

I have verified that a user 'sys.py' does not mask sys imports.  Python itself 
imports sys, so IDLE's 'import sys' just gets the existing sys.modules['sys'].

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26143>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to