Nick Coghlan <ncogh...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue13238>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to