[issue13238] Add shell command helpers to shutil module
Nick Coghlan
report at bugs.python.org
Fri Oct 28 14:28:15 CEST 2011
Nick Coghlan <ncoghlan at gmail.com> added the comment:
I realised I could use the convert_field() option in the custom formatter to choose between several interpolation quoting options:
default - str + shutil.quote_ascii_whitespace
!q - str + shlex.quote
!u - unquoted (i.e. no conversion, str.format default behaviour)
!s - str (as usual)
!r - repr (as usual)
The most recent commit also exposes public APIs for the formatting aspects (shutil.quote_ascii_whitespace, shutil.shell_format, shutil.shell_format_map)
----------
keywords: +patch
Added file: http://bugs.python.org/file23542/issue13238_shell_helpers.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13238>
_______________________________________
More information about the Python-bugs-list
mailing list