This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients mdcowles, terry.reedy
Date 2017-04-28.19:19:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493407160.33.0.0608054315655.issue26143@psf.upfronthosting.co.za>
In-reply-to
Content
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'].
History
Date User Action Args
2017-04-28 19:19:20terry.reedysetrecipients: + terry.reedy, mdcowles
2017-04-28 19:19:20terry.reedysetmessageid: <1493407160.33.0.0608054315655.issue26143@psf.upfronthosting.co.za>
2017-04-28 19:19:20terry.reedylinkissue26143 messages
2017-04-28 19:19:20terry.reedycreate