[issue22454] Adding the opposite function of shlex.split()

Daniel Himmelstein report at bugs.python.org
Fri Sep 6 10:43:48 EDT 2019


Daniel Himmelstein <daniel.himmelstein at gmail.com> added the comment:

I am interested in shlex.join as a way to log subprocess.CompletedProcess.args as a string that users could run in their terminals. I initially assumed that this was also the scope of shlex.join. However, it seems that shlex.join does not accept all types of command arguments supported by subprocess, such as pathlib.Path objects. Should shlex.join support an split_command list that includes pathlib.Path objects and any other types supported by subprocess?

----------
nosy: +dhimmel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22454>
_______________________________________


More information about the Python-bugs-list mailing list