On 10/28/2015 12:21 PM, Peter Otten wrote: > PS: The shell people have learned their lesson and no longer include the > working directory in the PATH: > $ ls # the real thing > $ ./ls # use at your own risk
Sure but this is a somewhat different genre. > > So maybe > >>>> import string # stdlib >>>> from . import string # whatever you dropped into your working directory > > OK, probably not (just brainstorming). > It's actually not just interactive Python sessions where people are attacked by themselves by covering other modules in the path. It happens in programs too, like recently on the list where someone called their python program turtle.py and managed to stick it in a weird path, but one that is normally in the Python search path, and then when someone wanted to import turtle from the stdlib, they got the one in C:\windows\system32. Granted that is really a misconfiguration problem on the part of the OS for allowing a normal user to write to a system location. So yeah I dunno. -- https://mail.python.org/mailman/listinfo/python-list