https://github.com/python/cpython/commit/3de65463814c1fb24aa52da34c8421b2b7a2fb30 commit: 3de65463814c1fb24aa52da34c8421b2b7a2fb30 branch: 3.13 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: picnixz <10796600+picn...@users.noreply.github.com> date: 2025-05-10T10:51:38+02:00 summary:
[3.13] gh-132971: Update shutil.which() docs (GH-133067) (#133804) gh-132971: Update shutil.which() docs (GH-133067) (cherry picked from commit d13d5fdf610a294a6c3dc125e0856fb7fdd41e49) Co-authored-by: Kokona <125976684+985025...@users.noreply.github.com> files: M Doc/library/shutil.rst diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 544c1e464b3c2f..3572bfbabd064e 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -454,6 +454,10 @@ Directory and files operations :envvar:`PATH` environment variable is read from :data:`os.environ`, falling back to :data:`os.defpath` if it is not set. + If *cmd* contains a directory component, :func:`!which` only checks the + specified path directly and does not search the directories listed in + *path* or in the system's :envvar:`PATH` environment variable. + On Windows, the current directory is prepended to the *path* if *mode* does not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the Windows API ``NeedCurrentDirectoryForExePathW`` will be consulted to _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com