Suggestion for pathlib: differentiate explicit and implicit local paths (pathlib.StrictPath?)

Note that I steered my discussion away from the shell. I’m talking about API calls that search PATH (or some other search path), such as os.execlp(), and Python’s shutil.which() and subprocess.Popen. For example:

>>> shutil.which('./ls') is None
True
>>> shutil.which(pathlib.Path('./ls'))
'/usr/bin/ls'
4 Likes