Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Windows: Provide an option to disable search in CWD onshutil.which #91558

Open
@naveen521kk

Description

@naveen521kk

I would like to search for an executable in the PATH but not from the current working directory (cwd). By default, as documented inshutil.which, it prepends the cwd before PATH, so it's not possible to get the expected executable.

For example, I have awhoami.exe in the cwd but I would like to get the one from the system32 directory; there's no way to do so usingshutil.which.

>>>importshutil>>>shutil.which('whoami')'.\\whoami.EXE'

I think it makes sense for that to be the default behaviour since that's how it is on Windows. I would like to have a parameter to disable this behaviour inshutil.which.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp