Open
Description
Feature or enhancement
Proposal:
A common use-case of shlex.join
is to get a shell-like invocation of a command.
In my experience, when writing small custom scripts, it is very common to use shlex.join
in conjunction with subprocess.run
, to log the command invocation to the output. subprocess.run
has accepted path-like arguments since 3.6 on POSIX, and 3.8 on Windows, so when we want to use shutil.join
, we need extra code to convert the path-like objects in the command sequence to strings.
It would be nice if shutil.join
could receive the same command sequence as subprocess.run
.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
GH-72809 proposed this for shlex.quote
.