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 kbk, lac, markroseman, roger.serwy, terry.reedy
Date 2015-10-30.01:01:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446166871.69.0.0358361838091.issue25514@psf.upfronthosting.co.za>
In-reply-to
Content
Laura, I did not understand from your python-list post that you were complaining about shadowing disabling IDLE itself, as opposed to user code.  That is partly because you followed up on Peter Otten complaining because IDLE tries to run user code the same way that python does.

The solution for IDLE itself is for IDLE to do what python does on startup, which is to ensure that the stdlib modules it needs are indeed imported from the stdlib.  I presume that python only prepends '' to sys.path *after* it does its imports.  Example:

>>> import sys; list(sys.modules)
[..., abc, ...]
C:\Users\Terry>echo "print('abc')" >abc  # verified with dir
C:\Users\Terry>python
>>> >>> import sys; sys.modules['abc'].__file__
'C:\\Programs\\Python35\\lib\\abc.py'

So IDLE should remove sys.path[0] from sys.path and, in the user process, restore it only after normal imports. Ignore -n single process mode for now.

Aside from this, the popup message needs to be changed, but better that it occur less often (by the fix above) or never (by switching to pipes?).

As for user code: I have in mind that there should be a doc how-to about tracebacks and exception messages, with a sections giving possible explanations and remedies for specific messages, such as the above.  This I would make messages like the above a link to the how-to entry.  In the meanwhile, we could consider a special case search of error message lines.

-I just noticed that this issue is the result of a pydev thread. Off to read that.
History
Date User Action Args
2015-10-30 01:01:11terry.reedysetrecipients: + terry.reedy, kbk, roger.serwy, markroseman, lac
2015-10-30 01:01:11terry.reedysetmessageid: <1446166871.69.0.0358361838091.issue25514@psf.upfronthosting.co.za>
2015-10-30 01:01:11terry.reedylinkissue25514 messages
2015-10-30 01:01:11terry.reedycreate