diff options
Diffstat (limited to 'Doc/library/shlex.rst')
-rw-r--r-- | Doc/library/shlex.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/shlex.rst b/Doc/library/shlex.rst index fb335c6900..8c5b0239d1 100644 --- a/Doc/library/shlex.rst +++ b/Doc/library/shlex.rst @@ -37,6 +37,21 @@ The :mod:`shlex` module defines the following functions: standard input. +.. function:: join(split_command) + + Concatenate the tokens of the list *split_command* and return a string. + This function is the inverse of :func:`split`. + + >>> from shlex import join + >>> print(join(['echo', '-n', 'Multiple words'])) + echo -n 'Multiple words' + + The returned value is shell-escaped to protect against injection + vulnerabilities (see :func:`quote`). + + .. versionadded:: 3.8 + + .. function:: quote(s) Return a shell-escaped version of the string *s*. The returned value is a |